[go: up one dir, main page]

Skip to content

Improve Snippet Error Handling: Differentiate Status Codes for Server vs. Client Errors

The question came up during our discussion on where the snippet response status code mapper should exist. We observed that the current implementation rescues StandardError and always returns a 400 when a snippet fails to be created or updated. However, failures can also occur due to server errors, in which case a different status code would be more appropriate, even if the reason remains the same. The snippet service should be able to determine the correct status code for each error scenario

Edited by Emma Park