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

fix(api-gateway): Catch error from contextToApiScopes #7521

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

ovr
Copy link
Member

@ovr ovr commented Dec 12, 2023

Hello!

Thanks

@ovr ovr requested a review from a team as a code owner December 12, 2023 15:02
Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-react-pivot-table 🔄 Building (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 3:26pm
7 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-angular-dashboard ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm
examples-react-d3 ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm
examples-react-dashboard ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm
examples-react-data-table ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm
examples-react-highcharts ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm
examples-react-material-ui ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm
examples-vue-query-builder ⬜️ Ignored (Inspect) Visit Preview Dec 12, 2023 3:26pm

} catch (e: unknown) {
if (e instanceof CubejsHandlerError) {
res.status(e.status).json({ error: e.message });
}
Copy link
Member Author

Choose a reason for hiding this comment

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

There is no call for next when error != CubejsHandlerError.
This will lead to unhandled connection.

);
if (next) next();
} catch (e: unknown) {
if (e instanceof CubejsHandlerError) {
Copy link
Member Author

Choose a reason for hiding this comment

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

There is no call for next when error != CubejsHandlerError.
This will lead to unhandled connection.

}
},
],
userMiddlewares,

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
}
},
],
userMiddlewares,

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
authorization
, but is not rate-limited.
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (74b0862) 48.02% compared to head (7789469) 48.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7521      +/-   ##
==========================================
- Coverage   48.02%   48.02%   -0.01%     
==========================================
  Files         154      154              
  Lines       20903    20893      -10     
  Branches     5373     5378       +5     
==========================================
- Hits        10039    10033       -6     
+ Misses      10122    10120       -2     
+ Partials      742      740       -2     
Flag Coverage Δ
cube-backend 48.02% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@ovr ovr merged commit 0214472 into master Dec 12, 2023
34 of 35 checks passed
@ovr ovr deleted the fix/server-core-broken-api-scope-assert branch December 12, 2023 15:46
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.

None yet

2 participants