Skip to content

fix: 405 instead of 501 on POST to v1 detail API#11162

Merged
jennifer-richards merged 3 commits into
ietf-tools:mainfrom
jennifer-richards:tastypie-post-detail
Jul 6, 2026
Merged

fix: 405 instead of 501 on POST to v1 detail API#11162
jennifer-richards merged 3 commits into
ietf-tools:mainfrom
jennifer-richards:tastypie-post-detail

Conversation

@jennifer-richards

Copy link
Copy Markdown
Member

This will prevent 501 errors on POST to API v1 routes like /api/v1/submit/submission/auth/. Note that there's nothing special about that app/model or the /auth/ there - we get the same response for /api/v1/doc/document/frobozz/zorkmid/.

This is a narrow fix, specifically handling the post_detail view. We could consider wholesale blocking of POST/PATCH/PUT/DELETE to the v1 API, but that will require touching all of our resource classes to limit the allowed methods (at least for the straightforward mechanism, there may be cleverer approaches).

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.58%. Comparing base (8dbc1bc) to head (32c0dfc).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11162      +/-   ##
==========================================
+ Coverage   88.52%   88.58%   +0.06%     
==========================================
  Files         334      333       -1     
  Lines       45102    44665     -437     
==========================================
- Hits        39927    39568     -359     
+ Misses       5175     5097      -78     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jennifer-richards jennifer-richards merged commit e736082 into ietf-tools:main Jul 6, 2026
9 checks passed
@jennifer-richards jennifer-richards deleted the tastypie-post-detail branch July 6, 2026 18:58
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants