File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -109,6 +109,18 @@ export async function getChainInfraCheckoutURL(options: {
109109 }
110110
111111 const json = await res . json ( ) ;
112+
113+ if (
114+ "error" in json &&
115+ "message" in json . error &&
116+ typeof json . error . message === "string"
117+ ) {
118+ return {
119+ error : json . error . message ,
120+ status : "error" ,
121+ } as const ;
122+ }
123+
112124 if ( ! json . result ) {
113125 return {
114126 error : "An unknown error occurred, please try again later." ,
Original file line number Diff line number Diff line change @@ -75,6 +75,18 @@ export async function getBillingCheckoutUrl(options: {
7575 }
7676
7777 const json = await res . json ( ) ;
78+
79+ if (
80+ "error" in json &&
81+ "message" in json . error &&
82+ typeof json . error . message === "string"
83+ ) {
84+ return {
85+ error : json . error . message ,
86+ status : "error" ,
87+ } as const ;
88+ }
89+
7890 if ( ! json . result ) {
7991 return {
8092 error : "An unknown error occurred, please try again later." ,
You can’t perform that action at this time.
0 commit comments