Skip to content

Commit 9b45aae

Browse files
committed
fix: display appropriate error message on account status fetch failure outside of unauthorized access (#5595)
https://linear.app/thirdweb/issue/CNCT-2428/pro-upcade-ecosystem-wallet-restriction-not-working <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving error handling in the `get-enclave-user-status.ts` file by changing the error message thrown when fetching the account status fails. It updates the error message to provide more clarity based on the response. ### Detailed summary - Updated the error message in `get-enclave-user-status.ts` from `result.error` to `result.message` for clarity when fetching account status fails. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 3b75143 commit 9b45aae

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rude-radios-smash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Display error message when failing to fetch account status from endpoint outside of unauthorized requests

packages/thirdweb/src/wallets/in-app/core/actions/get-enclave-user-status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function getUserStatus({
3737
return undefined;
3838
}
3939
const result = await response.json();
40-
throw new Error(`Failed to get user status: ${result.error}`);
40+
throw new Error(`Failed to get user status: ${result.message}`);
4141
}
4242

4343
return (await response.json()) as UserStatus;

0 commit comments

Comments
 (0)