-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log k8s server response for HttpOeprationException (#65)
Co-authored-by: Timm Hoffmeister <hoffmeistert@bluelizard.org.uk>
- Loading branch information
Showing
2 changed files
with
29 additions
and
5 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/Orleans.Clustering.Kubernetes/Extensions/HttpOperationExceptionExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using k8s.Autorest; | ||
|
||
namespace Orleans.Clustering.Kubernetes.Extensions; | ||
|
||
public static class HttpOperationExceptionExtensions | ||
{ | ||
public static string GetServerResponse(this HttpOperationException exception) | ||
{ | ||
try | ||
{ | ||
return exception.Response.Content; | ||
} | ||
catch | ||
{ | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters