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

feat(core): Return OAuth2 error body if available #5794

Merged
merged 3 commits into from
May 16, 2023

Conversation

that-one-tom
Copy link
Contributor

@that-one-tom that-one-tom commented Mar 27, 2023

We occasionally get reports of failed OAuth2 connection attempts. We usually display generic error messages, but these often don't tell the user what exactly is wrong.

As many APIs return more detailed information in the response body, we should provide this information where available.

For example, here is the error message currently returned when connecting to the bunq OAuth2 API:

before

Here is the same error after the change, now confirming what exactly is missing (and giving users a chance to fix the problem manually):

after

This is particularly useful for APIs that don't conform to the OAuth2 specification (and for which our library doesn't fully account).

Fixes:
#6256

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Mar 27, 2023
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (51fb913) 27.39% compared to head (0d9c554) 27.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5794   +/-   ##
=======================================
  Coverage   27.39%   27.39%           
=======================================
  Files        2937     2937           
  Lines      180177   180177           
  Branches    19557    19557           
=======================================
  Hits        49362    49362           
  Misses     130082   130082           
  Partials      733      733           
Impacted Files Coverage Δ
...ckages/cli/src/credentials/oauth2Credential.api.ts 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@netroy netroy added the community Authored by a community member label May 16, 2023
@netroy netroy merged commit 79d0a0f into n8n-io:master May 16, 2023
MiloradFilipovic added a commit that referenced this pull request May 16, 2023
* master: (22 commits)
  fix: Remove workflow execution credential error message when instance owner (#6116)
  refactor(editor): Drop vue-typed-mixins (no-changelog) (#6257)
  feat(core): Return OAuth2 error body if available (#5794)
  fix: Add itemSize config to workflows view recycle scroller (no-changelog) (#6238)
  fix(editor): Fix close and cancel operations on useMessage (no-changelog) (#6260)
  feat(editor): Add cloud ExecutionsUsage and API blocking using licenses (#6159)
  refactor(editor): Turn showMessage mixin to composable (#6081) (#6244)
  feat(core): Add experimental proxy support to License-SDK (no-changelog) (#6253)
  feat(core): Reduce the number of events sent to Sentry (#6235)
  feat(editor): Drop support for legacy browsers that do not have native ESM support (#6239)
  refactor(editor): Add missing interface IUserListAction (no-changelog) (#6241)
  ci: Debug e2e pipeline (no-changelog) (#6240)
  Revert "refactor(editor): Turn showMessage mixin to composable" (#6243)
  feat(editor): Updating node reference pattern in expression editor (#6228)
  refactor(editor): Remove unused dependencies (no-changelog) (#6223)
  refactor(editor): Turn showMessage mixin to composable (#6081)
  feat(editor): Version Control settings update (WIP) (#6233)
  ci: Fix linting issue on master (no-changelog) (#6232)
  fix: Prevent type error messages for manual executions (no-changelog) (#6229)
  fix(Code Node): Restore help text (#6231)
  ...
@janober
Copy link
Member

janober commented May 25, 2023

Got released with n8n@0.230.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Authored by a community member core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants