Skip to content

Commit

Permalink
Merge pull request #36 from WeihanLi/patch-1
Browse files Browse the repository at this point in the history
Update Utils.cs
  • Loading branch information
catcherwong authored Mar 28, 2022
2 parents 04e92d4 + 3c2d8de commit c12593c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Dtmcli/DtmImp/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ namespace Dtmcli.DtmImp
{
public static class Utils
{
private static readonly int StatusTooEarly = 425;
private static readonly string CheckStatusMsgFormat = "http response status: {status}, Message :{dtmResult}";
private const int StatusTooEarly = 425;
private const string CheckStatusMsgFormat = "http response status: {status}, Message :{dtmResult}";

public static async Task<Exception> RespAsErrorCompatible(HttpResponseMessage resp)
{
Expand All @@ -36,7 +36,7 @@ public static void CheckStatus(HttpStatusCode status, string dtmResult)
{
if (status != HttpStatusCode.OK || dtmResult.Contains(DtmCommon.Constant.ResultFailure))
{
throw new DtmException(string.Format(CheckStatusMsgFormat, status, dtmResult));
throw new DtmException(string.Format(CheckStatusMsgFormat, status.ToString(), dtmResult));
}
}
}
Expand Down

0 comments on commit c12593c

Please sign in to comment.