notFound method

Response notFound([
  1. String? message
])

Implementation

Response notFound([String? message]) {
  const status = 404;
  if (message == null) return response.status(status);
  return response.json({'error': message}, statusCode: status);
}