Skip to content

Commit abd3f71

Browse files
authored
fix(s3): accept 200 for delete response for better compatibility (#636)
1 parent 7692bd0 commit abd3f71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/drivers/s3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export default defineDriver((options: S3DriverOptions) => {
133133
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html
134134
const deleteObject = async (key: string) => {
135135
return awsFetch(url(key), { method: "DELETE" }).then((r) => {
136-
if (r?.status !== 204) {
136+
if (r?.status !== 204 && r?.status !== 200) {
137137
throw createError(DRIVER_NAME, `Failed to delete ${key}`);
138138
}
139139
});

0 commit comments

Comments
 (0)