diff --git a/src/components/HoldPages/HoldRequestErrorBanner.tsx b/src/components/HoldPages/HoldRequestErrorBanner.tsx
index ee7288b4e..2cfbf9120 100644
--- a/src/components/HoldPages/HoldRequestErrorBanner.tsx
+++ b/src/components/HoldPages/HoldRequestErrorBanner.tsx
@@ -58,62 +58,58 @@ const HoldRequestErrorBanner = ({
},
}}
content={
- <>
-
- {HOLD_PAGE_CONTACT_PREFIXES?.[errorStatus] ? (
-
- <>
- {HOLD_PAGE_CONTACT_PREFIXES?.[errorStatus]}
- {" Please try again, "}
- {" "}
- for assistance, or{" "}
- start a new search.
- >
-
- ) : null}
- {(() => {
- switch (errorStatus) {
- case "invalid":
- return "Some fields contain errors. Please correct and submit again."
- case "patronIneligible":
- return patronEligibilityStatus ? (
-
- ) : null
- default:
- return null
- }
- })()}
-
- >
+
+ {HOLD_PAGE_CONTACT_PREFIXES?.[errorStatus] ? (
+
+ {HOLD_PAGE_CONTACT_PREFIXES?.[errorStatus]}
+ {" Please try again, "}
+ {" "}
+ for assistance, or{" "}
+ start a new search.
+
+ ) : null}
+ {(() => {
+ switch (errorStatus) {
+ case "invalid":
+ return "Some fields contain errors. Please correct and submit again."
+ case "patronIneligible":
+ return patronEligibilityStatus ? (
+
+ ) : null
+ default:
+ return null
+ }
+ })()}
+
}
mb="s"
/>
diff --git a/src/server/api/hold.ts b/src/server/api/hold.ts
index 97993bd30..c34c341c4 100644
--- a/src/server/api/hold.ts
+++ b/src/server/api/hold.ts
@@ -225,10 +225,10 @@ export async function fetchPatronEligibility(
}
if (eligibilityResult.eligibility === false) {
- return { status: 401 }
+ return { status: 401, ...eligibilityResult }
}
- return { status: 200, ...eligibilityResult } as PatronEligibilityStatus
+ return { status: 200, ...eligibilityResult }
} catch (error) {
console.error(
`Error fetching hold request eligibility in fetchPatronEligibility server function, patronId: ${patronId}`,