Fix error
This commit is contained in:
parent
9be9884924
commit
3dd6a77556
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import "dart:convert";
|
||||||
import "dart:io";
|
import "dart:io";
|
||||||
import "package:cli_tools/config.dart";
|
import "package:cli_tools/config.dart";
|
||||||
import "package:http/http.dart" as http;
|
import "package:http/http.dart" as http;
|
||||||
|
@ -31,9 +32,9 @@ void main(List<String> argsRaw) async {
|
||||||
|
|
||||||
if (authResponse.statusCode != 200) {
|
if (authResponse.statusCode != 200) {
|
||||||
return Response.internalServerError(
|
return Response.internalServerError(
|
||||||
body: {
|
body: json.encode({
|
||||||
"error": "An error occurred: ${authResponse.statusCode}.",
|
"error": "An error occurred: ${authResponse.statusCode}.",
|
||||||
},
|
}),
|
||||||
headers: {HttpHeaders.contentTypeHeader: "application/json"},
|
headers: {HttpHeaders.contentTypeHeader: "application/json"},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue