Creates a GenericError from an RTK Query error for well-known fetch failures.
This follows the established pattern in the codebase for converting RTK Query errors to the SDK's GenericError type with type: 'wellknown_error'.
type: 'wellknown_error'
Optional
The error from RTK Query dispatch result, or undefined if no response
A GenericError with type 'wellknown_error'
const { data, error } = await store.dispatch( wellknownApi.endpoints.configuration.initiate(url));if (error || !data) { const genericError = createWellknownError(error); log.error(genericError.message); throw new Error(genericError.message);} Copy
const { data, error } = await store.dispatch( wellknownApi.endpoints.configuration.initiate(url));if (error || !data) { const genericError = createWellknownError(error); log.error(genericError.message); throw new Error(genericError.message);}
Creates a GenericError from an RTK Query error for well-known fetch failures.
This follows the established pattern in the codebase for converting RTK Query errors to the SDK's GenericError type with
type: 'wellknown_error'.