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

Adjust Error Handling for the All Search API #4396

Closed
kevinreiss opened this issue Oct 11, 2023 · 3 comments · Fixed by #5079
Closed

Adjust Error Handling for the All Search API #4396

kevinreiss opened this issue Oct 11, 2023 · 3 comments · Fixed by #5079
Assignees

Comments

@kevinreiss
Copy link
Member

kevinreiss commented Oct 11, 2023

The allsearch api returns 400s with useful JSON data when an empty query is passed, and 500s if it encounters an error, but in both cases, it returns the generic PUL error page (see, e.g., https://allsearch-api.princeton.edu/search/catalog?query=). This may be an issue of needing to change behavior on the load balancer (in the Princeton Ansible NGINX config, probably something to do with the errors.conf template). We'd like to return a meaningful error message to client applications.

@kevinreiss
Copy link
Member Author

kevinreiss commented Oct 11, 2023

related to pulibrary/allsearch_api#126

@sandbergja sandbergja self-assigned this Oct 18, 2023
@sandbergja sandbergja self-assigned this Nov 2, 2023
@kevinreiss
Copy link
Member Author

Jane will check in with operations on how this change fits in with wider Ansible template re-factor.

@sandbergja
Copy link
Member

We should wait to adjust the error handling until the allsearch_api nginx config is generated by an ansible template (#4397 )

@sandbergja sandbergja removed their assignment Jan 12, 2024
@kevinreiss kevinreiss added this to the AllSearch Go Live milestone Jun 28, 2024
@sandbergja sandbergja self-assigned this Jun 28, 2024
sandbergja added a commit that referenced this issue Jun 28, 2024
This allows 400 and 500 JSON responses through from the application, and
returns other errors in JSON format, rather than the standard
"Something went wrong" html page.

Closes #4396

For background information on why we'd like to offer JSON errors, see
https://github.com/pulibrary/allsearch_api/blob/main/architecture-decisions/001_error_output.md
sandbergja added a commit that referenced this issue Jun 28, 2024
This allows 400 and 500 JSON responses through from the application, and
returns other errors in JSON format, rather than the standard
"Something went wrong" html page.

Closes #4396

For background information on why we'd like to offer JSON errors, see
https://github.com/pulibrary/allsearch_api/blob/main/architecture-decisions/001_error_output.md
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

Successfully merging a pull request may close this issue.

2 participants