Skip to content
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

Request: Handle atom error messages #10

Closed
ACBullen opened this issue Feb 21, 2020 · 3 comments
Closed

Request: Handle atom error messages #10

ACBullen opened this issue Feb 21, 2020 · 3 comments

Comments

@ACBullen
Copy link
Contributor

Is there any intent/interest in accepting atoms as error messages? For instance if the reason a mutation errors is its unauthenticated or the record it is attempting to change doesn't exist, :unauthorized or :not_found would be the expected error return, but if I want this library to parse that into the message I'd have to check to see if I'm returning an atom everywhere I might and stringify it.

Is adding a function head that converts atoms to binaries to convert_to_payload/1 a reasonable thing, or is the assumption that users of this library catch simple atom errors and format them into more verbose errors?

@ACBullen
Copy link
Contributor Author

ACBullen commented Mar 2, 2020

Made a quick implementation in this PR

@ACBullen
Copy link
Contributor Author

Any opinions from the maintainers on this request and the related PR?

@remi
Copy link
Member

remi commented May 22, 2020

This as closed by #12 👌

@remi remi closed this as completed May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants