Throws a 500 Internal Server Error. Set includeRealException to true to print include the actual exception along with this error. Useful flag for development vs. production.
Source
AngelHttpException(error,
{bool includeRealError: false, StackTrace stackTrace}) :super.base() {
statusCode = 500;
message = "500 Internal Server Error";
if (includeRealError) {
errors.add(error.toString());
if (stackTrace != null) {
errors.add(stackTrace.toString());
}
}
}