rest error 304 proper handling

Signed-off-by: Nikunj Hudka <nikunjhudka123@gmail.com>
This commit is contained in:
Nikunj Hudka
2024-12-02 17:01:12 -04:00
parent 83e7780ca4
commit e0f83d6373
@@ -44,7 +44,7 @@ export function parseUrl(url: string): { path: string; container: string } {
const parsedUrl = new URL(url);
const pathSegments = parsedUrl.pathname.split('/').filter(Boolean);
if (pathSegments.length < 2) {
if (pathSegments.length < 1) {
throw new Error(`Invalid Azure Blob Storage URL format: ${url}`);
}
@@ -171,7 +171,7 @@ export class AzureBlobStorageUrlReader implements UrlReaderService {
},
);
} catch (e) {
if (e.$metadata && e.$metadata.httpStatusCode === 304) {
if (e.statusCode === 304) {
throw new NotModifiedError();
}