Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## Upcoming Release

Blob:

- Fixed issue of: error code not matching Azure blob storage is returned when overwriting existing blobs with incorrect permissions

## 2023.08 Version 3.26.0

General:
Expand Down
2 changes: 1 addition & 1 deletion src/blob/authentication/BlobSASAuthenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export default class BlobSASAuthenticator implements IAuthenticator {
`BlobSASAuthenticator:validate() Account SAS validation failed for special requirement.`,
context.contextId
);
throw StorageErrorFactory.getAuthorizationPermissionMismatch(
throw StorageErrorFactory.getUnauthorizedBlobOverwrite(
context.contextId!
);
}
Expand Down
11 changes: 11 additions & 0 deletions src/blob/errors/StorageErrorFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,17 @@ export default class StorageErrorFactory {
);
}

public static getUnauthorizedBlobOverwrite(
contextID: string
): StorageError {
return new StorageError(
403,
"UnauthorizedBlobOverwrite",
"This request is not authorized to perform blob overwrites.",
contextID
);
}

public static getAuthorizationServiceMismatch(
contextID: string
): StorageError {
Expand Down