It seems that the design of afterFetch and onFetchError is confusing. Issues raised in #553 and #526 are similar to this one, and were "fixed" by #572 that move the error after the call to afterFetch, leading to
context: BeforeFetchContext execute: (throwOnFailed?: boolean) => Promise<any> } export interface OnFetchErrorContext<T = any, E = any> { error: E data: T | null response: Response | null context: BeforeFetchContext execute: (throwOnFailed?: boolean) => Promise<any> } export interface...