Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-infra] remove e identifier #4152

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading