serverError function

Response serverError()

A transient server-side failure — the one class of error that gets exponential backoff, because GitHub advertises no wait for it.

Implementation

http.Response serverError() => http.Response(
      jsonEncode({'message': 'Server Error'}),
      502,
      headers: const {'content-type': 'application/json'},
    );