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

Add a null-check to the ids argument in the quays Transmodel API endpoint. #6557

Draft
wants to merge 5 commits into
base: dev-2.x
Choose a base branch
from

Conversation

eibakke
Copy link
Contributor

@eibakke eibakke commented Mar 19, 2025

Summary

This makes the quays API endpoint in the Transmodel API return an error if a null value is passed for the ids argument. This is in line with the behavior today, but today the error happens because the response is too large. Failing early is preferable.

This change also throws an exception when no parameters are set, requiring that either name or ids is set.

Issue

#6543

Unit tests

Tested by running locally. There are no unit tests at this level.

@eibakke eibakke requested a review from a team as a code owner March 19, 2025 13:15
@eibakke eibakke requested a review from vpaturet March 19, 2025 13:16
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.

Project coverage is 70.24%. Comparing base (c2355db) to head (a9a6bff).
Report is 73 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...anner/apis/transmodel/TransmodelGraphQLSchema.java 14.28% 6 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6557      +/-   ##
=============================================
- Coverage      70.25%   70.24%   -0.02%     
+ Complexity     18387    18385       -2     
=============================================
  Files           2088     2088              
  Lines          77425    77418       -7     
  Branches        7843     7842       -1     
=============================================
- Hits           54395    54382      -13     
- Misses         20258    20267       +9     
+ Partials        2772     2769       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Choose a reason for hiding this comment

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

The documentation should be changed, it currently says Get all quays

…del API and adds description of requirement that either ids or name must be set.
@vpaturet vpaturet added Entur Test This is currently being tested at Entur and removed Entur Test This is currently being tested at Entur labels Mar 28, 2025
@optionsome optionsome marked this pull request as draft April 1, 2025 08:31
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.

3 participants