BloomRpcServerResponse.serverError constructor

BloomRpcServerResponse.serverError(
  1. String message, {
  2. Map<String, String>? headers,
})

Factory for an internal server error response (status 500).

Implementation

factory BloomRpcServerResponse.serverError(String message,
        {Map<String, String>? headers}) =>
    BloomRpcServerResponse(
      statusCode: 500,
      body: {'error': message, 'statusCode': 500},
      headers: headers ??
          const {'content-type': 'application/json; charset=utf-8'},
    );