diff --git a/CHANGELOG.md b/CHANGELOG.md index 37ffcfd4a..f6ad91aa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,7 @@ UIIN-3437. * *BREAKING* Migrate config values from mod-configuration. Refs UIIN-3426. * Make interface dependencies optional (audit-inventory, circulation). Refs UIIN-3592. * Improve usage of GET `/users-keycloak/_self` requests in "Inventory" app. Fixes UIIN-3585. +* Error handling is missing when creating holdings. Fixes UIIN-3591. ## [13.0.10](https://github.com/folio-org/ui-inventory/tree/v13.0.10) (2025-09-01) [Full Changelog](https://github.com/folio-org/ui-inventory/compare/v13.0.9...v13.0.10) diff --git a/src/Holding/CreateHolding/CreateHolding.js b/src/Holding/CreateHolding/CreateHolding.js index fd0dd8248..c884b9fb4 100644 --- a/src/Holding/CreateHolding/CreateHolding.js +++ b/src/Holding/CreateHolding/CreateHolding.js @@ -57,6 +57,16 @@ const CreateHolding = ({ values={{ hrid: holdingsRecord.hrid }} />, }); + }) + .catch((error) => { + const defaultErrorMessage = ; + + error.text().then(text => { + callout.sendCallout({ + type: 'error', + message: text || defaultErrorMessage, + }); + }); }); }, [onCancel, callout]); @@ -95,6 +105,7 @@ CreateHolding.manifest = Object.freeze({ type: 'okapi', path: 'holdings-storage/holdings', fetch: false, + throwErrors: false, }, });