Skip to content

Commit

Permalink
feat: examples as tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jirikostiha committed Jun 23, 2024
1 parent 6ba8ee4 commit 2ecd3b2
Show file tree
Hide file tree
Showing 5 changed files with 751 additions and 257 deletions.
14 changes: 7 additions & 7 deletions src/SyncAPIConnector/responses/APIErrorResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,29 @@ public class APIErrorResponse : Exception
{
private ERR_CODE code;
private string errDesc;
private string msg;
private string msgBody;

public APIErrorResponse(ERR_CODE code, string errDesc, string msg) : base(msg)
public APIErrorResponse(ERR_CODE code, string errDesc, string msgBody)
: base()
{
this.code = code;
this.errDesc = errDesc;
this.msg = msg;
this.msgBody = msgBody;
}

public override string Message
{
get
{
return "ERR_CODE = " + code.StringValue + " ERR_DESC = " + errDesc + "\n" + msg + "\n" + base.Message;
return $"ERR_CODE '{code.StringValue}' ERR_DESC '{errDesc}'\n{msgBody}";
}
}

public virtual string Msg
public virtual string MsgBody
{
get
{
return msg;
return msgBody;
}
}

Expand All @@ -54,5 +55,4 @@ public override string ToString()
return ErrorCode.StringValue + ": " + ErrorDescr;
}
}

}
Loading

0 comments on commit 2ecd3b2

Please sign in to comment.