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

Handling errors from OC /manifest and /formList endpoints #19

Open
eprager412 opened this issue Jan 8, 2024 · 0 comments
Open

Handling errors from OC /manifest and /formList endpoints #19

eprager412 opened this issue Jan 8, 2024 · 0 comments
Assignees
Milestone

Comments

@eprager412
Copy link

eprager412 commented Jan 8, 2024

When we call a PDF endpoint to create a PDF of a form, we are sometimes not able to handle OC /manifest and /formList endpoints that are consumed by Enketo. In certain situations these calls might return Bad_Request, Internal Server Error, or any other type of error code to Enketo. In all cases where the call to /manifest or /formList returns an error, we want the parent call to Enketo to return a corresponding error code. Currently we have addressed the /manifest call correctly for 401 error code only #34,

Note below is the specific error that caused the creation of this ticket.
Today we are not handling errors gracefully, for example when a Bad_Request returns, on the form load, we are seeing

"Hold on a second... in a small window Request to... failed." However, in print server, the call is returning a BLANK PDF page on each form with status code 201(success). This is not correct because the request was bad the BLANK PDF should not be generated with a success code. We expect to receive no PDF and an error code.

@pbowen-oc pbowen-oc added this to the Next milestone Jan 8, 2024
@MartijnR MartijnR transferred this issue from OpenClinica/enketo-express-oc May 22, 2024
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