-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat(jobs): verify test exists before creating/updating job #29
Conversation
src/jobs/helpers/jobVerifier.js
Outdated
await testsManager.getTest(jobBody.test_id); | ||
} catch (error) { | ||
if (error.statusCode === 404) { | ||
return res.status(400).json({ message: `test with id: ${jobBody.test_id} does not exist` }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use global error handler
src/jobs/helpers/jobVerifier.js
Outdated
if (error.statusCode === 404) { | ||
return res.status(400).json({ message: `test with id: ${jobBody.test_id} does not exist` }); | ||
} else { | ||
return res.status(500).json({ message: error.message }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use global error handler
tests/system-tests/logs/postgres.log
Outdated
@@ -21,21 +21,21 @@ Success. You can now start the database server using: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove file
b29040b
to
6addbd5
Compare
re #26