From d70e399288b7baae8f80a0e2ebfdfdeb7f7de01f Mon Sep 17 00:00:00 2001 From: Dmytro Melnyshyn Date: Tue, 30 Dec 2025 16:55:11 +0200 Subject: [PATCH] UID-209: Password reset process - ensure proper response for missing user credentials. --- CHANGELOG.md | 1 + src/settings/Passwd.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eebaac1..1f0071ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Remove display of mod-configuration values. Refs UID-182. * Include mod-settings permissions for access to tenant-wide values. Refs UID-206. * Display mod-scheduler's timers. Refs UID-208. +* Password reset process - ensure proper response for missing user credentials. Fixes UID-209. ## [10.0.0](https://github.com/folio-org/ui-developer/tree/v10.0.0) (2025-03-17) [Full Changelog](https://github.com/folio-org/ui-developer/compare/v9.0.0...v10.0.0) diff --git a/src/settings/Passwd.js b/src/settings/Passwd.js index 725ba6e7..310d7913 100644 --- a/src/settings/Passwd.js +++ b/src/settings/Passwd.js @@ -33,6 +33,7 @@ class Passwd extends React.Component { path: 'authn/credentials-existence', fetch: false, accumulate: true, + throwErrors: false, }, }); @@ -95,7 +96,16 @@ class Passwd extends React.Component { throw new Error(intl.formatMessage({ id: 'ui-developer.passwd.error.missingUser' }, { username: values.username })); } }) - .then(() => mutator.isLocalPasswordSet.GET({ params: { userId } })) + .then(async () => { + try { + const response = await mutator.isLocalPasswordSet.GET({ params: { userId } }); + return response; + } catch (e) { + return { + credentialsExist: false, + }; + } + }) .then(res => { const credentials = { username: values.username,