REST promise assertion failure doesnt count

Hello,
here is my codeceptJS scenario

The assertion at line 9 should trigger a faillure as the response.status is 404

But it doest count, at the end i got :

UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: 200 == 404
OK  | 1 passed   // 81ms

What am i missing here ?

Thanks for your help :slight_smile:

1 Like

Try

const response = await I sendGetRequest(’/api’)

1 Like

Thanks ! It worked
Here are all my json assertions

This should be documented