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

Return HTTP 400 when attempting to post an event with an unregistered schema #1463

Merged
merged 7 commits into from
Nov 4, 2024

Conversation

afshin
Copy link
Contributor

@afshin afshin commented Oct 18, 2024

Currently if a POST is made to /api/events with a well-formed event that has a schema that hasn't been registered with the event_logger, the REST API returns an HTTP 500 error, but in every case I could find where an exception is raised, it comes from bad input, so it should be an HTTP 400 error.

depends on: jupyter/jupyter_events#101

@afshin afshin added the bug label Oct 18, 2024
@afshin afshin marked this pull request as draft October 18, 2024 15:34
@afshin afshin marked this pull request as ready for review October 18, 2024 15:50
@afshin afshin marked this pull request as draft October 24, 2024 15:17
@afshin afshin force-pushed the unregistered-event branch 3 times, most recently from fd89dfd to d1c7a54 Compare October 29, 2024 11:50
@afshin afshin marked this pull request as ready for review October 29, 2024 13:51
@afshin afshin requested a review from Zsailer October 29, 2024 17:56
@Zsailer Zsailer self-assigned this Nov 4, 2024
Copy link
Member

@Zsailer Zsailer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanks @afshin.

@Zsailer Zsailer enabled auto-merge (squash) November 4, 2024 22:36
@Zsailer Zsailer merged commit 432a9cc into jupyter-server:main Nov 4, 2024
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants