refactor: interceptor error display in graphql response (#3553)

This commit is contained in:
Nivedin
2023-11-17 17:03:53 +05:30
committed by GitHub
parent 50f475334e
commit a3aa9b68fc
6 changed files with 118 additions and 24 deletions

View File

@@ -209,7 +209,6 @@ export class ExtensionInterceptorService
req: AxiosRequestConfig
): RequestRunResult["response"] {
const extensionHook = window.__POSTWOMAN_EXTENSION_HOOK__
if (!extensionHook) {
return E.left(<InterceptorError>{
// TODO: i18n this
@@ -230,6 +229,7 @@ export class ExtensionInterceptorService
return E.right(result)
} catch (e) {
console.error(e)
// TODO: improve type checking
if ((e as any).response) {
return E.right((e as any).response)