You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when REST access for a View is not enabled, GravityView responds with an HTTP 500 error. This can lead to confusion for developers and users trying to troubleshoot issues related to REST API access. This enhancement proposes changing the response code to 401 (Unauthorized) to better reflect the nature of the error.
Steps to Reproduce:
Create a View in GravityView.
Make sure REST access is NOT allowed for the created View (Under Permissions).
Expected Behavior:
The API should return a 401 Unauthorized status code, indicating that access to the View is not permitted due to disabled REST access.
Actual Behavior:
The API currently returns a 500 Internal Server Error, which does not provide a clear indication of the issue related to REST access.
Solution direction WP_Error has a $data array, which can have a status key. This status will be used instead of the default 500; when provided.
The text was updated successfully, but these errors were encountered:
Currently, when REST access for a View is not enabled, GravityView responds with an HTTP 500 error. This can lead to confusion for developers and users trying to troubleshoot issues related to REST API access. This enhancement proposes changing the response code to 401 (Unauthorized) to better reflect the nature of the error.
Steps to Reproduce:
Expected Behavior:
The API should return a 401 Unauthorized status code, indicating that access to the View is not permitted due to disabled REST access.
Actual Behavior:
The API currently returns a 500 Internal Server Error, which does not provide a clear indication of the issue related to REST access.
Solution direction
WP_Error
has a$data
array, which can have astatus
key. This status will be used instead of the default 500; when provided.The text was updated successfully, but these errors were encountered: