convertError()
Home > @gooddata/sdk-ui > convertError
convertError() function
Converts any error into an instance of GoodDataSdkError.
Signature:
export declare function convertError(error: unknown): GoodDataSdkError;
Parameters
Parameter | Type | Description |
---|---|---|
error | unknown | error to convert |
Returns:
new instance of GoodDataSdkError
Remarks
The conversion logic right now focuses mostly on errors that are contractually specified in Analytical Backend SPI. All other unexpected errors are wrapped into an exception with the generic 'UNKNOWN_ERROR' code.
Instances of GoodDataSdkError are returned as-is and are not subject to any processing.