Handle 410 Gone status as ObjectDoesNotExistError in API calls#451
Merged
Conversation
|
KULTUS-API branch is deployed to platta: https://kultus-pr451.api.dev.hel.ninja 🚀🚀🚀 |
Handle 410 Gone status as ObjectDoesNotExistError in API calls. Refs: PT-1989
Use sorted, deterministic data in person study groups testing and snapshot. Future test runs will compare against this sorted snapshot. Refs: PT-1989
f599765 to
09e9a12
Compare
|
KULTUS-API branch is deployed to platta: https://kultus-pr451.api.dev.hel.ninja 🚀🚀🚀 |
Add comprehensive tests for 400, 404, and 410 status codes across API service functions: - fetch_place_as_json - fetch_event_as_json - update_event_to_linkedevents_api - resolve_unit_name_with_unit_id Organize tests into separate classes for better maintainability. Each test verifies correct exception handling (ApiBadRequestError for 400, ObjectDoesNotExistError for 404/410) with appropriate error messages distinguishing "not found" from "gone". Refs: PT-1989
|
|
KULTUS-API branch is deployed to platta: https://kultus-pr451.api.dev.hel.ninja 🚀🚀🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes KULTUS-API-E. The issue was that: LinkedEvents API's 410 Gone response for a place ID is unhandled, causing
HTTPErrorduring study group creation.ObjectDoesNotExistErroris now raised.get_place_data,get_event_data,get_event_data_with_auth, andget_place_data_with_auth.Refs: PT-1989
This fix was generated by Seer in Sentry, triggered by mika.hietanen@anders.com. 👁️ Run ID: 561228