code update recorded at: 27/06/25 13:03:17
This commit is contained in:
commit
c367a3e5db
|
|
@ -0,0 +1,13 @@
|
|||
export const handler = async (req, res) => {
|
||||
try {
|
||||
// Sends 'bar' as response
|
||||
res.send(process.env.FOO);
|
||||
} catch (error) {
|
||||
// Handle errors
|
||||
console.error(error);
|
||||
// Send an error response if needed
|
||||
res.statusCode = 500;
|
||||
res.setHeader("Content-Type", "text/plain");
|
||||
res.end("Internal Server Error");
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user