We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fca300 commit 2daaf71Copy full SHA for 2daaf71
helm/values.yaml
@@ -115,3 +115,4 @@ envVars:
115
COMPlus_EnableDiagnostics: "0"
116
ASPNETCORE_ENVIRONMENT: Production
117
ASPNETCORE_URLS: http://+:8080;http://+:58080
118
+ ShowExceptions: false
src/Program.cs
@@ -63,11 +63,19 @@
63
64
return Results.Ok(jsonObject);
65
}
66
- catch (HttpRequestException e)
+ catch (Exception e)
67
{
68
Console.WriteLine("\nException Caught!");
69
Console.WriteLine("Message: {0} ", e.Message);
70
- return Results.BadRequest(e.Message);
+
71
+ if (builder.Configuration.GetValue<bool>("ShowExceptions"))
72
+ {
73
+ throw new InvalidOperationException(e.Message);
74
+ }
75
+ else
76
77
+ return Results.NoContent();
78
79
80
}).CacheOutput();
81
0 commit comments