Skip to content

Conversation

@ThomasKalverda
Copy link
Contributor

@ThomasKalverda ThomasKalverda commented Feb 10, 2026

This PR aims to fix most of the inconsistencies found by CoffeeIT in our mobile api endpoints. I opted for 'quick fixes' instead of rewriting the entire mobile_api app, because edubadges is legacy anyway and it will be replaced soonish. In educredentials we'll make sure to use the full power of DRF and make everything as consistent as possible.

The document provided by CoffeeIT has a detailed overview of various inconsistencies and a checklist at the bottom. This PR fixes the first 3.

  • Badge image field name (image vs image_url)
  • Enrollments field name variations (date_created vs created_at, badge_class vs badgeclass, denied vs acceptance)
  • Badge instance IDs format in collections (String/int/Map - varies by HTTP method)
  • Error message field names (error vs detail)
  • Authentication error status codes (401 vs 403)

The last 2 are a bit different:

  • The error messages 'error' vs 'detail' mostly comes from the older views that are reused. It feels like a bit of an overkill to rewrite those entire endpoints, just to get the error field name named correctly.
    Edit: Discussed with Okke: The authentication error messages do not come from EduID and also not from our mobile authentication backend. So I asked about this in the slack with CoffeeIT
  • The authentication errors come from EduID, so we don't really have influence there at this moment. We could ask to update the error codes to the correct ones, but not sure what other services depend on those..

Before we deploy this, I want to write them a detailed overview of everything that changed, so they can update their code quickly

Copy link
Contributor

@Iso5786 Iso5786 left a comment

Choose a reason for hiding this comment

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

LGTM

@Iso5786 Iso5786 merged commit 7cba71f into develop Feb 11, 2026
6 checks passed
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