Last active
May 7, 2019 21:32
-
-
Save sultaniman/124fa3538d6fd29bea47f924f99b26b8 to your computer and use it in GitHub Desktop.
process errors helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def process_errors(%Changeset{} = changeset) do | |
%{ | |
message: "Changeset errors occurred", | |
code: :schema_errors, | |
errors: to_api_errors(changeset) | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment