-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to keep error title *and* detail in the error message? #368
Comments
I see that we have access to |
currently you can monkey patch class JsonApiClient::ErrorCollector::Error
def error_key
super # you can override error key too
end
def error_msg
title
end In future releases I think we can expose it to something like class Person < JsonApiClient::Resource
def generate_error(error_object)
[error_key, error_msg]
end
end |
I also ran into this issue and am getting by with the monkeypatch solution. For reference, the api that I'm interacting with uses Graphiti: https://www.graphiti.dev/ For each validation error, the title is While they may not be following the json api spec correctly, your proposed future release change would be appreciated to handle cases like this. |
Hello.
Due to this line in the error_collector.rb, we're not able to retrieve the error
detail
if a request (for examplesave
) fails.Could this be fixed or is there an easy way to override this logic?
Thank you.
The text was updated successfully, but these errors were encountered: