ApiError<U> constructor

const ApiError<U>({
  1. required U error,
  2. required int code,
})

Constructs an ApiError response with the given error object and status code.

Implementation

const ApiError({
  required this.error,
  required this.code,
});