Allow some more HTTP errors (403 and 404) to be thrown from db hooks

For put and patch methods, raising an abort(403) or abort(404) result in a 400 error.