Improve errors
This commit is contained in:
parent
c00582c750
commit
5a7574170c
1 changed files with 4 additions and 2 deletions
|
@ -34,9 +34,11 @@ void main(List<String> argsRaw) async {
|
|||
);
|
||||
|
||||
if (authResponse.statusCode != 200) {
|
||||
return Response.internalServerError(
|
||||
return Response(
|
||||
authResponse.statusCode,
|
||||
body: json.encode({
|
||||
"error": "An error occurred: ${authResponse.statusCode}.",
|
||||
"error":
|
||||
"An error occurred when calling `authUri`: ${authResponse.body}.",
|
||||
}),
|
||||
headers: {HttpHeaders.contentTypeHeader: "application/json"},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue