- const { response } = await makePOSTAPRequest(url, signedBody, baseHttpSignature(), headers)
-
- expect(response.statusCode).to.equal(HttpStatusCode.FORBIDDEN_403)
+ try {
+ await makePOSTAPRequest(url, signedBody, baseHttpSignature(), headers)
+ expect(true, 'Did not throw').to.be.false
+ } catch (err) {
+ expect(err.statusCode).to.equal(HttpStatusCode.FORBIDDEN_403)
+ }