We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22be1cb commit ac50ce3Copy full SHA for ac50ce3
packages/easyops-runtime/src/flowApi/FlowApi.ts
@@ -11,6 +11,7 @@ import type {
11
} from "@next-core/types";
12
import { hasOwnProperty } from "@next-core/utils/general";
13
import { getContract } from "./CollectContracts.js";
14
+import { isUnauthenticatedError } from "@next-core/runtime";
15
16
export type MinimalContractRequest = Pick<ContractRequest, "type"> & {
17
fields?: MinimalContractField[];
@@ -280,6 +281,10 @@ async function fetchFlowApiDefinitionFromRemote(
280
281
});
282
contractData = contractList![0];
283
} catch (e) {
284
+ if (isUnauthenticatedError(e)) {
285
+ // If unauthenticated, throw the error to be handled by upper level
286
+ throw e;
287
+ }
288
error = e;
289
}
290
0 commit comments