This commit is contained in:
akvlad
2025-01-29 10:45:50 +02:00
parent 822ba289c8
commit 90574d3e76
2 changed files with 5 additions and 2 deletions

View File

@ -52,7 +52,7 @@ async function handle (req, res) {
}
await Promise.all(promises)
} catch (error) {
await asyncLogError(error)
await asyncLogError(error, req.log)
res.status(500).send({ error: 'Internal Server Error' })
}
}

View File

@ -72,7 +72,7 @@ module.exports = class Builder {
for (const term of self.terms) {
const sqlTerm = self.getTerm(term)
self.sqlConditions.push(sqlTerm)
if (!term.Child('label_name').value.match(/^(\.|span\.|resource\.|name)/)) {
if (!term.Child('label_name').value.match(/^(\.|span\.|resource\.|name|status)/)) {
continue
}
self.where.push(sqlTerm)
@ -181,6 +181,9 @@ module.exports = class Builder {
case 'name':
key = 'name'
break
case 'status':
key = 'status'
break
default:
throw new Error(`unsupported attribute ${key}`)
}