diff --git a/lib/s3routes/routes/routeDELETE.ts b/lib/s3routes/routes/routeDELETE.ts index 484799c10..d439b18ec 100644 --- a/lib/s3routes/routes/routeDELETE.ts +++ b/lib/s3routes/routes/routeDELETE.ts @@ -58,10 +58,8 @@ export default function routeDELETE( * the object, the errors NoSuchKey and NoSuchVersion should not * be sent back as a response. */ - if (err && ( - !(err instanceof ArsenalError) || - (!err.is.NoSuchKey && err.is.NoSuchVersion) - )) { + // @ts-ignore + if (err && !err.is.NoSuchKey && !err.is.NoSuchVersion) { return routesUtils.responseNoBody(err, corsHeaders, response, undefined, log); }