REST promise assertion failure doesnt count


#1

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:


#2

Try

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


#3

Thanks ! It worked
Here are all my json assertions

This should be documented