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 error mapping list feature to oidc login method #1387

Merged
merged 32 commits into from
Jul 28, 2023

Conversation

alejandro-bulgaris-qcif
Copy link
Contributor

@alejandro-bulgaris-qcif alejandro-bulgaris-qcif commented Jul 5, 2023

This is an enhancement to allow oidc login config to handle error mappings. The configuration is expecting a list of error mapping objects that each one can be be configured to suit different needs. In example to match based on a regex pattern or to match based on a simple match string. And example configuration to capture different errors may be as below:

errorMappings: 
        [ 
          { 
            errorDescPattern: /(Error)\w/,
            altErrorRedboxCodeMessage: 'user-friendly-error'
          },
          { 
            errorDescPattern: /(Error1)\w/,
            altErrorRedboxCodeMessage: 'user-friendly-error', 
            altErrorRedboxCodeDetails: 'user-friendly-error-detail',
            altErrorAsObject: true
          },
          { 
            errorDescPattern: /Error2\s(?<interpolationKey1>.*)\sfrom\s(?<interpolationKey2>.*)\s\w/,
            matchRegexWithGroups: true,
            altErrorRedboxCodeMessage: 'user-friendly-error',
            altErrorRedboxCodeDetails: 'user-friendly-error-detail'
          },
          {
            errorDescPattern: 'Error3',
            altErrorRedboxCodeMessage: 'user-friendly-error'
          },
          {
            errorDescPattern: 'Error4',
            altErrorRedboxCodeMessage: 'user-friendly-error',
            altErrorRedboxCodeDetails: 'user-friendly-error-detail'
            altErrorAsObject: true
          }
        ]

shilob and others added 24 commits May 2, 2023 14:16
# Conflicts:
#	angular/package-lock.json
#	angular/package.json
#	core/package-lock.json
#	package-lock.json
#	package.json
#	tsconfig.json
- conflict resolution
- updates to Typescript imports caused by ongoing shift from CommonJS to ES6
- core-types updated to be in line with upcoming form changes
- introduced but disabled the new form app, as form field components are rebuilt
# Conflicts:
#	package-lock.json
#	package.json
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c9e5c9a) 69.94% compared to head (3e1d275) 69.94%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1387   +/-   ##
========================================
  Coverage    69.94%   69.94%           
========================================
  Files          110      110           
  Lines         1863     1863           
  Branches       216      216           
========================================
  Hits          1303     1303           
  Misses         560      560           
Flag Coverage Δ
frontend-core-lib 52.30% <ø> (ø)
frontend-dashboard 87.96% <ø> (ø)
frontend-export 100.00% <ø> (ø)
frontend-local-auth 100.00% <ø> (ø)
frontend-manage-roles 63.33% <ø> (ø)
frontend-manage-users 59.81% <ø> (ø)
frontend-report 100.00% <ø> (ø)

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.

@andrewbrazzatti andrewbrazzatti merged commit f84b32a into develop Jul 28, 2023
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