[Bug]: NC replies with HTTP status code 500 instead of 4xx when uploading invalid CalDAV entries. #46380
Closed
6 of 8 tasks
Labels
0. Needs triage
Pending check for reproducibility or if it fits our roadmap
29-feedback
bug
feature: caldav
Related to CalDAV internals
Bug description
Nextcloud replies with HTTP status code
500
and messageThis recurrence rule does not generate any valid instances
for the following inconsistent CalDAV entryObviously, NC is right to reject the calendar entry and the error message is correct. However, the HTTP status code should be
4xx
, not500
. HTTP status codes 5xx indicate a server-side error, but this error is a client-side error. A 5xx status code informs the client to try to repeat the same request later, but in this case the same request will fail again.More suitable status codes are
409
(Conflict) or422
(Unprocessable Content). The latter is probably the most suitable status code.I am using an Android smartphone with Google Calendar as the front-end UI and DAVx5 as the connector. I was somehow able to create the event above and DAVx5 become stuck, because it had the event in its local cash and endlessly tried to send the event to the NC server.
I am aware that there is a bug on several layers here. The Google Calender UI should prevent a user from creating such inconsistent events in the first place. But NC should also respond with the correct status code.
Steps to reproduce
Expected behavior
NC should respond with a 4xx status code, preferably 409 or 422
Installation method
Community Manual installation with Archive
Nextcloud Server version
29
Operating system
Other
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: