Skip to content

Commit

Permalink
(PC-34242) feat(identityCheck): add more informations in usePatchProf…
Browse files Browse the repository at this point in the history
…ile error (#7632)
  • Loading branch information
lbeneston-pass authored Feb 4, 2025
1 parent 5ae124d commit 9db82d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/features/identityCheck/api/usePatchProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ export function usePatchProfile() {
if (body) {
return api.postNativeV1SubscriptionProfile(body)
} else {
return Promise.reject(new Error('No body was provided for subscription profile'))
const profileWithMissingFileds = JSON.stringify(profile, (_, value) => value ?? null, 2)
return Promise.reject(
new Error(
`No body was provided for subscription profile. "getCompleteProfile()" return null because: ${profileWithMissingFileds}`
)
)
}
},
{
Expand Down

0 comments on commit 9db82d8

Please sign in to comment.