Skip to content

Feature Request for Custom Error Codes and Messages #5415

@golchha007

Description

@golchha007

Describe the Problem

We currently see generic error message is thrown for scenarios as mentioned below.
The request is to get custom error message and error code which would help us differentiate between different errors messages and scenarios.

Details :

Certificate format error
throw Error(The format of the provided certificate '${certificate.name}' is not supported. Supported formats are: ${supportedCertificateFormats.join(', ')}. ${format && ['jks', 'keystore'].includes(format) ? "You can convert Java Keystores (.jks, .keystore) into PKCS#12 keystores using the JVM's keytool CLI: keytool -importkeystore -srckeystore your-keystore.jks -destkeystore your-keystore.p12 -deststoretype pkcs12" : ''});

Token retrieval error

throw Error([
'The destination tried to provide authorization tokens but failed in all cases. This is most likely due to misconfiguration.',
'Original error messages:',
...authTokens.map(token => token.error)
].join(util_1.unixEOL));

User token missing error
throw Error(No user token (JWT) has been provided. This is strictly necessary for '${destination.authentication}'.);

Propose a Solution

The request is to get custom error message and error code which would help us differentiate between different errors messages and scenarios and will help the consumers of our library to handle different errors more gracefully.

Describe Alternatives

No response

Affected Development Phase

Development

Impact

Inconvenience

Timeline

Users of our library which uses cloud sdk is facing issues and we would need this as soon as possible as it completely blocks our development.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions