Skip to content

Commit

Permalink
[code-infra] remove e identifier (#4152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot authored Sep 25, 2024
1 parent 94d240e commit b35d8b7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions docs/src/components/landing-studio/CodeBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ export async function downloadPDF(limit: number = 100) {
}
)
);
} catch (e) {
console.log(e.stack);
} catch (error) {
console.log(error.stack);
console.log("Failed to process invoice id:", invoice.id);
throw e;
throw error;
}
})
);
Expand Down
2 changes: 1 addition & 1 deletion packages/toolpad-core/src/useDialogs/useDialogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export function PromptDialog({ open, payload, onClose }: PromptDialogProps) {
fullWidth
variant="standard"
value={input}
onChange={(e) => setInput(e.target.value)}
onChange={(event) => setInput(event.target.value)}
/>
</DialogContent>
<DialogActions>
Expand Down
4 changes: 2 additions & 2 deletions packages/toolpad-studio/src/server/appServerWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function devServerPlugin(): Plugin {
});

res.setHeader('content-type', 'text/html; charset=utf-8').end(html);
} catch (e) {
next(e);
} catch (error) {
next(error);
}
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,12 @@ export default function createDatasource(): ServerDataSource<
return res.redirect(`/_toolpad/app/connections/${encodeURIComponent(connectionId)}`);
}
return res.status(404).send('No handler exists for given path');
} catch (e) {
if (e instanceof Error) {
console.error(e.message);
return res.status(500).send(e.message);
} catch (error) {
if (error instanceof Error) {
console.error(error.message);
return res.status(500).send(error.message);
}
return res.status(500).send(e);
return res.status(500).send(error);
}
};
},
Expand Down

0 comments on commit b35d8b7

Please sign in to comment.