File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { EVMWallet } from "@thirdweb-dev/wallets" ;
2
2
import { Signer , providers } from "ethers" ;
3
3
4
+ import { StatusCodes } from "http-status-codes" ;
4
5
import { Address } from "thirdweb" ;
5
6
import { ethers5Adapter } from "thirdweb/adapters/ethers5" ;
6
7
import { Account } from "thirdweb/wallets" ;
7
8
import { getWalletDetails } from "../db/wallets/getWalletDetails" ;
8
9
import { WalletType } from "../schema/wallet" ;
10
+ import { createCustomError } from "../server/middleware/error" ;
9
11
import { getAwsKmsWallet } from "../server/utils/wallets/getAwsKmsWallet" ;
10
12
import { getGcpKmsWallet } from "../server/utils/wallets/getGcpKmsWallet" ;
11
13
import {
@@ -35,7 +37,11 @@ export const getAccount = async (args: {
35
37
address : from ,
36
38
} ) ;
37
39
if ( ! walletDetails ) {
38
- throw new Error ( `Backend wallet not found: ${ from } ` ) ;
40
+ throw createCustomError (
41
+ `No configured wallet found with address ${ from } ` ,
42
+ StatusCodes . BAD_REQUEST ,
43
+ "BAD_REQUEST" ,
44
+ ) ;
39
45
}
40
46
41
47
let wallet : EVMWallet ;
You can’t perform that action at this time.
0 commit comments