fix(preview): handle unavailable previews as no content
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -199,6 +199,9 @@ export async function transceiveBlob<TRequest>(operation: string, data: TRequest
|
||||
await fetchWrapper.post(API_URL, request, {
|
||||
headers: { 'Accept': '*/*' },
|
||||
onStream: async (response: Response) => {
|
||||
if (response.status === 204) {
|
||||
throw new Error(`[${operation}] Preview unavailable`);
|
||||
}
|
||||
blob = await response.blob();
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user