Skip to content

Commit

Permalink
api/run-test: print error code for unexpected errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmoron committed Feb 10, 2025
1 parent 50750fe commit baefe19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/src/misc/run-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export async function runTest(url, params, expect) {
if (expect.status !== result.body.status) {
const detail = `${expect.status} (expected) != ${result.body.status} (actual)`;
error.push(`status mismatch: ${detail}`);

if (result.body.status === 'error') {
error.push(`error code: ${result.body?.error?.code}`);
}
}

if (expect.errorCode && expect.errorCode !== result.body?.error?.code) {
Expand Down

0 comments on commit baefe19

Please sign in to comment.