Consider making /api/config/properties
return 204 No Content
instead of 404
when a setting is missing/empty
#9014
Labels
bug
interface: REST API v7+
REST API for v7 and later (dspace-server-webapp module)
needs discussion
Ticket or PR needs discussion before it can be moved forward.
Describe the bug
This seems to quickly becoming a "frequently asked question" on mailing lists & Slack. Some seem concerned that (when watching UI requests) they sometimes see error responses (404, etc)
For example:
/server/api/config/properties/google.analytics.key
is requested by the UI to determine if Google Analytics is enabled or not. This returns a 404 if GA is disabled.To Reproduce
One basic example:
google.analytics.key
on backendThis behavior can be confusing to sites as they may worry something is broken in the UI. But, in fact this is expected behavior when Google Analytics is disabled.
Expected behavior
We should consider whether these 404s should simply become 204. A 204 will not be seen as an error by the user's browser. But, it would also communicate to the DSpace UI that this configuration is not set or has no value on the backend.
This will require discussion, as it would need to be a documented API change.
The text was updated successfully, but these errors were encountered: