backend error message logging
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 41s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 41s
Details
This commit is contained in:
parent
d7df133991
commit
c207fca58e
|
@ -29,7 +29,14 @@ app.post('/write', async (req, res) => {
|
|||
app.get('/read/:hash', async (req, res) => {
|
||||
// Fetch content
|
||||
const { hash } = req.params;
|
||||
const data = await db.get(req.params.hash);
|
||||
let data;
|
||||
try {
|
||||
data = await db.get(req.params.hash);
|
||||
} catch (e) {
|
||||
console.log('read error:', e.message, hash);
|
||||
res.status(e.status).end();
|
||||
return;
|
||||
}
|
||||
console.log('read', hash);
|
||||
// Return content
|
||||
res.json(data);
|
||||
|
|
Loading…
Reference in New Issue