Skip to content

Handle 410 Gone status as ObjectDoesNotExistError in API calls#451

Merged
mhieta merged 3 commits into
mainfrom
seer/feat/handle-410-gone-status
Jan 15, 2026
Merged

Handle 410 Gone status as ObjectDoesNotExistError in API calls#451
mhieta merged 3 commits into
mainfrom
seer/feat/handle-410-gone-status

Conversation

@seer-by-sentry

@seer-by-sentry seer-by-sentry Bot commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

Fixes KULTUS-API-E. The issue was that: LinkedEvents API's 410 Gone response for a place ID is unhandled, causing HTTPError during study group creation.

  • Added handling for HTTP 410 (Gone) status code in LinkedEvents API service functions.
  • When a 410 status is received for place or event data, an ObjectDoesNotExistError is now raised.
  • This change affects get_place_data, get_event_data, get_event_data_with_auth, and get_place_data_with_auth.
  • Use sorting in person study groups test
  • Add HTTP status code tests for API services
  • Organize event api service tests into separate classes for better maintainability

Refs: PT-1989

This fix was generated by Seer in Sentry, triggered by mika.hietanen@anders.com. 👁️ Run ID: 561228

@mhieta mhieta marked this pull request as ready for review January 14, 2026 06:39
@mhieta mhieta requested a review from a team as a code owner January 14, 2026 06:39
@azure-pipelines

Copy link
Copy Markdown

KULTUS-API branch is deployed to platta: https://kultus-pr451.api.dev.hel.ninja 🚀🚀🚀

seer-by-sentry Bot and others added 2 commits January 14, 2026 14:52
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
@mhieta mhieta force-pushed the seer/feat/handle-410-gone-status branch from f599765 to 09e9a12 Compare January 14, 2026 12:52
@mhieta mhieta changed the title feat: handle 410 Gone status as ObjectDoesNotExistError in API calls Handle 410 Gone status as ObjectDoesNotExistError in API calls Jan 14, 2026
@mhieta mhieta marked this pull request as draft January 14, 2026 13:00
@azure-pipelines

Copy link
Copy Markdown

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
@sonarqubecloud

Copy link
Copy Markdown

@mhieta mhieta marked this pull request as ready for review January 15, 2026 06:39
@azure-pipelines

Copy link
Copy Markdown

KULTUS-API branch is deployed to platta: https://kultus-pr451.api.dev.hel.ninja 🚀🚀🚀

@voneiden voneiden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@mhieta mhieta merged commit e560c59 into main Jan 15, 2026
26 checks passed
@mhieta mhieta deleted the seer/feat/handle-410-gone-status branch January 15, 2026 08:06
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 this pull request may close these issues.

2 participants