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

Better POST api validation #25

Open
savpek opened this issue Jun 18, 2019 · 0 comments
Open

Better POST api validation #25

savpek opened this issue Jun 18, 2019 · 0 comments

Comments

@savpek
Copy link
Member

savpek commented Jun 18, 2019

There have two issues:

  • When end user posts new PDF there can be empty array for rows, it doesn't generate anything and returns empty array. Its hard to catch.
  • When user tries to fix previous and adds any object in language like C# to request, it could end in form like [ 1 ], array of number 1, this isn't accepted and error is something like internal server error.

Solution:

  • Modify api not to accept empty array and return bad request with human readable information what to fix if so.
  • If invalid row object is sent (like not parseable as object), return bad request with good information about issue.
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

1 participant