TL;DR
The agent generated a cleanup job calling DELETE on every resource, but the API only supports DELETE on some of them and returns 405 on the rest. Check the spec for which resources allow DELETE and skip (or archive instead of delete) the ones that do not.
Error
cleanup job failed nightly: 405 Method Not Allowed on /v1/reports
Steps
- Check the spec for DELETE on each resource the job touches Expected: you know which support it.
- Skip unsupported resources, or use the API's archive/deactivate alternative Expected: the job stops failing.
- Make the job log-and-continue per resource instead of aborting Expected: one unsupported resource does not kill the run.
- Re-run the cleanup and confirm a clean pass Expected: nightly job is green.
When to use
- Cleanup jobs 405 on some resources
- The agent assumed uniform DELETE support
When not to use
- DELETE is supported but auth is wrong (that is 401/403, not 405)
- You need hard deletes (then ask the provider or use the console)
Tool compatibility
- HTTP method support per resource
- Generated cleanup/sync jobs
Variant phrasings
405 on delete
Not every resource supports DELETE. Check the spec per resource.
cleanup job failing nightly
Same: skip or archive resources without DELETE support.
Why it happens
REST conventions suggest every resource has the full verb set, so agents generate DELETE for all of them. Real APIs are rarely that uniform.
Edge cases
- Some APIs soft-delete with a status field instead of DELETE
- 405 can also mean the route needs a different path; verify against the spec
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_H1rBLPteYp6DWM8fsHKKiQ
Source: Vectle. Version: skv_NuN1l6lWLigWl4uYhZqjrA. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.