Skip to content

Commit dacdcdf

Browse files
committed
fix errors
1 parent 0b9a49c commit dacdcdf

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

valhalla/jawn/src/controllers/public/stripeController.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ export class StripeController extends Controller {
146146
this.setStatus(400);
147147
throw new Error("Amount must be at least 5");
148148
}
149+
if (body.amount > 10000) {
150+
this.setStatus(400);
151+
throw new Error("Amount must not exceed 10000");
152+
}
149153
const result = await stripeManager.createCloudGatewayCheckoutSession(
150154
request.headers.origin ?? "",
151155
body.amount,

web/components/templates/gateway/routerUseDialog.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const RouterUseDialog = ({
126126

127127
<TabsContent value="curl" className="mt-4">
128128
<DiffHighlight
129-
code={getRouterCode(baseUrl, "curl")}
129+
code={getRouterCode("curl")}
130130
language="bash"
131131
newLines={[]}
132132
oldLines={[]}
@@ -137,7 +137,7 @@ const RouterUseDialog = ({
137137

138138
<TabsContent value="javascript" className="mt-4">
139139
<DiffHighlight
140-
code={getRouterCode(baseUrl, "javascript")}
140+
code={getRouterCode("javascript")}
141141
language="typescript"
142142
newLines={[]}
143143
oldLines={[]}
@@ -148,7 +148,7 @@ const RouterUseDialog = ({
148148

149149
<TabsContent value="python" className="mt-4">
150150
<DiffHighlight
151-
code={getRouterCode(baseUrl, "python")}
151+
code={getRouterCode("python")}
152152
language="python"
153153
newLines={[]}
154154
oldLines={[]}

web/pages/onboarding/request/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,13 @@ export default function RequestPage() {
256256
<div className="text-sm text-destructive">{error}</div>
257257
) : (
258258
<div className="whitespace-pre-wrap text-sm">
259-
{JSON.parse(response).content}
259+
{(() => {
260+
try {
261+
return JSON.parse(response).content;
262+
} catch {
263+
return response;
264+
}
265+
})()}
260266
</div>
261267
)}
262268
{isStreaming && (

0 commit comments

Comments
 (0)