errorResponse method

Map<String, Object?> errorResponse(
  1. String requestId, {
  2. int code = 300,
  3. String message = 'User declined the transaction',
})

A failed response to the request with requestId.

Implementation

Map<String, Object?> errorResponse(
  String requestId, {
  int code = 300,
  String message = 'User declined the transaction',
}) => {
  'error': {'code': code, 'message': message},
  'id': requestId,
};