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 11import type { EVMWallet } from "@thirdweb-dev/wallets" ;
22import { AwsKmsWallet } from "@thirdweb-dev/wallets/evm/wallets/aws-kms" ;
33import { GcpKmsWallet } from "@thirdweb-dev/wallets/evm/wallets/gcp-kms" ;
4+ import { StatusCodes } from "http-status-codes" ;
45import { getWalletDetails } from "../../db/wallets/getWalletDetails" ;
56import type { PrismaTransaction } from "../../schema/prisma" ;
67import { WalletType } from "../../schema/wallet" ;
8+ import { createCustomError } from "../../server/middleware/error" ;
79import { splitAwsKmsArn } from "../../server/utils/wallets/awsKmsArn" ;
810import { splitGcpKmsResourcePath } from "../../server/utils/wallets/gcpKmsResourcePath" ;
911import { getLocalWallet } from "../../server/utils/wallets/getLocalWallet" ;
@@ -40,7 +42,11 @@ export const getWallet = async <TWallet extends EVMWallet>({
4042 } ) ;
4143
4244 if ( ! walletDetails ) {
43- throw new Error ( `No configured wallet found with address ${ walletAddress } ` ) ;
45+ throw createCustomError (
46+ `No configured wallet found with address ${ walletAddress } ` ,
47+ StatusCodes . BAD_REQUEST ,
48+ "BAD_REQUEST" ,
49+ ) ;
4450 }
4551
4652 const config = await getConfig ( ) ;
You can’t perform that action at this time.
0 commit comments