diff --git a/src/main.test.ts b/src/main.test.ts index 179fef8..ce5fa59 100644 --- a/src/main.test.ts +++ b/src/main.test.ts @@ -1138,7 +1138,7 @@ describe('delete', () => { test('Deletes from the blob store', async () => { const mockStore = new MockFetch().delete({ headers: { authorization: `Bearer ${edgeToken}` }, - response: new Response(null, { status: 202 }), + response: new Response(null, { status: 204 }), url: `${edgeURL}/${siteID}/production/${key}`, }) diff --git a/src/store.ts b/src/store.ts index 20ea4f2..f4858a3 100644 --- a/src/store.ts +++ b/src/store.ts @@ -76,7 +76,7 @@ export class Store { async delete(key: string) { const res = await this.client.makeRequest({ key, method: HTTPMethod.DELETE, storeName: this.name }) - if (![200, 202, 404].includes(res.status)) { + if (![200, 204, 404].includes(res.status)) { throw new BlobsInternalError(res.status) } }