Skip to content

Commit

Permalink
fix parsing DBS error payload
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Dec 20, 2024
1 parent f3d7cce commit 167dcae
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ func runTestWorkflow(t *testing.T, v TestCase) {

rr := responseRecorder(t, v)
if v.Verbose > 1 {
t.Logf("response %+v", rr)
t.Logf("response code %v", rr.Code)
body := rr.Body
var records []ServerError
if err = json.Unmarshal(body.Bytes(), &records); err == nil {
for _, rec := range records {
fmt.Printf("ERROR: %s", rec.DBSError)
}
} else {
fmt.Println("### body\n", body.String())
}
}
// check response code
if rr.Code != v.Code {
Expand Down

0 comments on commit 167dcae

Please sign in to comment.