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

Better error handling during frodo saml export #192

Closed
vscheuber opened this issue Jan 27, 2023 · 0 comments · Fixed by #193
Closed

Better error handling during frodo saml export #192

vscheuber opened this issue Jan 27, 2023 · 0 comments · Fixed by #193
Assignees
Labels
enhancement New feature or request

Comments

@vscheuber
Copy link
Contributor

Describe the solution you'd like

When frodo encounters errors during the export of a saml provider it should describe the error as closely as possible, when exporting all providers (-a or -A) it should report the error and continue on.

See an example where the metadata of a provider cannot be retrieved and frodo reports a meaningless error:

% frodo saml export -A volker-dev
Connected to https://openam-volker-dev.forgeblocks.com/am [alpha] as user volker.scheuber@forgerock.com
[=============---------------------------] 33% | 1/3 | Exporting provider darinder-demonode:internal/errors:477
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received nu
    at __node_internal_captureLargerStackTrace (node:internal/errors:477:5)
    at new NodeError (node:internal/errors:387:5)
    at Function.from (node:buffer:328:9)
    at enc (file:///Users/vscheuber/Projects/frodo-lib/esm/api/utils/Base64.mjs:40:46)
    at exportDependencies (file:///Users/vscheuber/Projects/frodo-lib/esm/ops/Saml2Ops.mjs:90:74)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async exportSaml2Provider (file:///Users/vscheuber/Projects/frodo-lib/esm/ops/Saml2Ops.mjs:179:3)
    at exportSaml2ProvidersToFiles (/Users/vscheuber/Projects/frodo-cli/esm/ops/ops/Saml2Ops.ts:233:24)
    at FrodoCommand.<anonymous> (/Users/vscheuber/Projects/frodo-cli/esm/cli/saml/cli/saml/saml-export.ts:88:11) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v18.7.0
@vscheuber vscheuber added the enhancement New feature or request label Jan 27, 2023
@vscheuber vscheuber self-assigned this Jan 27, 2023
vscheuber added a commit to vscheuber/frodo-lib that referenced this issue Jan 27, 2023
vscheuber added a commit to vscheuber/frodo-cli that referenced this issue Jan 27, 2023
vscheuber added a commit to vscheuber/frodo-lib that referenced this issue Aug 28, 2023
vscheuber added a commit to vscheuber/frodo-lib that referenced this issue Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant