openapi: support standard http error codes

API errors are now handled at the end of the request heap by
throwing exceptions from the handler
This commit is contained in:
Viljami Kuosmanen 2020-04-01 18:18:02 +02:00 committed by muxator
parent 3742fdfb04
commit ccf406708e
5 changed files with 111 additions and 48 deletions

View file

@ -111,7 +111,7 @@ describe('deletePad', function(){
it('deletes a Pad', function(done) {
api.get(endPoint('deletePad')+"&padID="+testPadId)
.expect('Content-Type', /json/)
.expect(200, done)
.expect(200, done) // @TODO: we shouldn't expect 200 here since the pad may not exist
});
})