We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 917fe40 commit d8e01bfCopy full SHA for d8e01bf
definitions/vite-supadata-runner/worker/userRoutes.ts
@@ -40,10 +40,20 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
40
app.post('/api/supadata/transcript', async (c) => {
41
let apiKey = ''
42
let e = {} as any
43
+ const cookie = getCookie(c)
44
try {
- e = await c.req.json();
45
- // GET API KEY BY THIS METHOD. DO NOT GET API KEY FROM ENV.
+ // GET API KEY BY THIS METHOD. DO NOT GET API KEY FROM ENV.
46
apiKey = await getUserAPIKey(c);
47
+ } catch(e: any) {
48
+ return c.json({
49
+ success: false,
50
+ cookie,
51
+ error: e.message
52
+ }, { status: 501 });
53
+ }
54
+ try {
55
+ e = await c.req.json();
56
+
57
58
// Initialize the client
59
const supadata = new Supadata({
0 commit comments