abortWithError method
Abort the chain immediately and write a specific statusCode plus message.
Implementation
void abortWithError(int statusCode, [String message = '']) {
abort();
_response.statusCode = statusCode;
if (message.isNotEmpty) {
_response.write(message);
}
}