-
- Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Currently, if you use retry with fetchBaseQuery(), and you bail out early (eg, because of a 4xx status), then the result is missing meta data.
The code for fail is:
function fail(e: any): never { throw Object.assign(new HandledError({ error: e }), { throwImmediately: true, }) }So retry.fail() is only returning / throwing the error, and not returning the meta, although HandledError is capable of handling meta:
export class HandledError { constructor( public readonly value: any, public readonly meta: any = undefined ) {} }Gribbs