Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update URL Metric storage REST API endpoint to return status code 423 Locked instead of 403 Forbidden #1863

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

hbhalodia
Copy link
Contributor

Summary

Fixes #1860

Relevant technical choices

  • Updated the permission_callback for url-metrics:store route to use 423 as status code instead of 403.

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: westonruter <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter westonruter added [Plugin] Optimization Detective Issues for the Optimization Detective plugin [Type] Enhancement A suggestion for improvement of an existing feature labels Feb 11, 2025
Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.64%. Comparing base (cb79463) to head (647c173).
Report is 2 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk    #1863   +/-   ##
=======================================
  Coverage   66.64%   66.64%           
=======================================
  Files          88       88           
  Lines        7015     7015           
=======================================
  Hits         4675     4675           
  Misses       2340     2340           
Flag Coverage Δ
multisite 66.64% <100.00%> (ø)
single 37.27% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@westonruter westonruter changed the title Fix: Update the url metric storage lock status code to use 423 instead of 403 forbidden Update URL Metric storage REST API endpoint to return status code 423 Locked instead of 403 Forbidden Feb 11, 2025
@westonruter westonruter merged commit d21b74d into WordPress:trunk Feb 11, 2025
21 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Optimization Detective Issues for the Optimization Detective plugin [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST API endpoint for storing a URL Metric should return a 423 Locked status code instead of 403 Forbidden
2 participants