Skip to content

Commit

Permalink
feat(retry): nit
Browse files Browse the repository at this point in the history
Refs: #1667
Signed-off-by: Jonah Kaye <[email protected]>
  • Loading branch information
jonahkaye committed Jun 20, 2024
1 parent 858a904 commit 8771bfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ import { capture } from "../../../../../../util/notifications";
import { RegistryError, RegistryErrorList } from "./schema";

const { log } = out("XCA Error Handling");
const knownNonRetryableErrors = [
"No active consent for patient id",
"Failed to find document with unique ID",
];
const knownNonRetryableErrors = ["No active consent for patient id"];

export function processRegistryErrorList(
registryErrorList: RegistryErrorList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,9 @@ export function handleSchemaErrorResponse({
}

/**
* Retries if the response has an error that is not in the known non-retryable errors list
* Will not retry if the response is successful and is not an error.
* For now lets not retry on any error. We have network retries already. s
*/
export function isRetryable(outboundResponse: OutboundPatientDiscoveryResp | undefined): boolean {
if (!outboundResponse) return false;
return (
outboundResponse.operationOutcome?.issue.some(
issue =>
issue.severity === "error" && issue.code !== "http-error" && issue.code !== "schema-error"
) ?? false
);
return false;
}

0 comments on commit 8771bfa

Please sign in to comment.