Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions samples/DtmSample/Controllers/MsgTestController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,22 @@ public async Task<IActionResult> MsgMySqlQueryPrepared(CancellationToken cancell

/// <summary>
/// MSG QueryPrepared(mssql)
///
/// tips: Starting with server v1.10, dtm server changed to use the http status code, but was compatible with the body returned by older versions
/// The http status code 200 with unrecognized body It will be as normal!
/// eg: v1.18.0 [dtm/client/dtmcli/utils.go · dtm-labs/dtm](https://github.com/dtm-labs/dtm/blob/v1.18.0/client/dtmcli/utils.go)
/// func HTTPResp2DtmError(resp *resty.Response) error {
/// code := resp.StatusCode()
/// str := resp.String()
/// if code == http.StatusTooEarly || strings.Contains(str, ResultOngoing) {
/// return ErrorMessage2Error(str, ErrOngoing)
/// } else if code == http.StatusConflict || strings.Contains(str, ResultFailure) {
/// return ErrorMessage2Error(str, ErrFailure)
/// } else if code != http.StatusOK {
/// return errors.New(str)
/// }
/// return nil
/// }
/// </summary>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Expand Down
Loading