Improve errors

This commit is contained in:
Henry Hiles 2025-07-26 23:11:25 -04:00
commit 5a7574170c
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -34,9 +34,11 @@ void main(List<String> argsRaw) async {
); );
if (authResponse.statusCode != 200) { if (authResponse.statusCode != 200) {
return Response.internalServerError( return Response(
authResponse.statusCode,
body: json.encode({ body: json.encode({
"error": "An error occurred: ${authResponse.statusCode}.", "error":
"An error occurred when calling `authUri`: ${authResponse.body}.",
}), }),
headers: {HttpHeaders.contentTypeHeader: "application/json"}, headers: {HttpHeaders.contentTypeHeader: "application/json"},
); );