Custom JSON errors for Servant-server
问题 When using servant, I'd like to return all errors as JSON. Currently, if a request fails to parse, I see an error message like this, returned as plain text Failed reading: not a valid json value Instead I would like to return this as application/json {"error":"Failed reading: not a valid json value"} How can I do this? The docs say ServantErr is the default error type, and I can certainly respond with custom errors inside my handlers, but if parsing fails I don't see how I can return a custom