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

Errors in JSON format #33

Open
goshoo opened this issue Jun 29, 2022 · 8 comments
Open

Errors in JSON format #33

goshoo opened this issue Jun 29, 2022 · 8 comments

Comments

@goshoo
Copy link

goshoo commented Jun 29, 2022

Hi,

this is a feature request.

is it possible somehow users to be able to configure format for validation errors. Now the only format is plain text but I would like JSON format to be an option as well.

@singulared
Copy link
Collaborator

Hi, @goshoo you may use custom error handler for this case #20 (comment)

@goshoo
Copy link
Author

goshoo commented Jul 9, 2022

Hi @singulared,

thanks for the link!

@singulared
Copy link
Collaborator

@goshoo Can i close this issue?

@goshoo
Copy link
Author

goshoo commented Jul 15, 2022

@singulared,

sure, but I think that it'll be a good idea this possibility for custom error handler to be documented somewhere.

@singulared
Copy link
Collaborator

singulared commented Jul 15, 2022

@goshoo
Yep, I think it should be optional. But I don't understand what structure it should have for now.

@goshoo
Copy link
Author

goshoo commented Jul 15, 2022

Maybe it should be a unique list of fields which have errors (hash table) and every value for every field should be an array of error messages ( vector of Strings).

@singulared
Copy link
Collaborator

I am thinking about another actix-web errors. Ok, I will try implement something with fixed structure on this weekend.

@DenuxPlays
Copy link

Any updates on this?

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

3 participants