Properly propagate 204 to fetchManifest
This commit is contained in:
parent
c857250b12
commit
b6287f4839
3 changed files with 25 additions and 7 deletions
|
@ -1381,17 +1381,29 @@ export function initialize({
|
|||
): Promise<Uint8Array> {
|
||||
const { credentials, greaterThanVersion } = options;
|
||||
|
||||
return _ajax({
|
||||
const { data, response } = await _ajax({
|
||||
call: 'storageManifest',
|
||||
contentType: 'application/x-protobuf',
|
||||
host: storageUrl,
|
||||
httpType: 'GET',
|
||||
responseType: 'bytes',
|
||||
responseType: 'byteswithdetails',
|
||||
urlParameters: greaterThanVersion
|
||||
? `/version/${greaterThanVersion}`
|
||||
: '',
|
||||
...credentials,
|
||||
});
|
||||
|
||||
if (response.status === 204) {
|
||||
throw makeHTTPError(
|
||||
'promiseAjax: error response',
|
||||
response.status,
|
||||
response.headers.raw(),
|
||||
data,
|
||||
new Error().stack
|
||||
);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
async function getStorageRecords(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue