Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion client-app/core/api/graphql/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ export function toServerError(
networkError: NetworkError | undefined,
graphQLErrors: ReadonlyArray<GraphQLFormattedError> | undefined,
): ServerError | undefined {
const isExplicitlyAborted = networkError?.toString().includes(AbortReason.Explicit);
const abortMessage = networkError?.toString() ?? "";
const isExplicitlyAborted =
abortMessage.includes(AbortReason.Explicit) ||
abortMessage.includes("AbortError") ||
networkError?.name === "AbortError";

if ((networkError && !isExplicitlyAborted) || hasErrorCode(graphQLErrors, GraphQLErrorCode.Unhandled)) {
return ServerError.Unhandled;
}
Expand Down
Loading