Skip to content

Commit 7c0bcbd

Browse files
committed
ipn/yegor: ws err msgs from svc
1 parent 864ea0f commit 7c0bcbd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

intra/ipn/rpn/yegor.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,12 @@ func wsErr2(res *http.Response, op string) (*WsErrorResponse, error) {
12031203
return nil, log.EE("ws: %s: (%d) unmarshal err: %v; body: %s", op, code, err, truncate2k(body))
12041204
}
12051205

1206+
if len(wsErr.Error) > 0 {
1207+
wsErr.Msg += "/" + wsErr.Error
1208+
}
1209+
if len(wsErr.Desc) <= 0 {
1210+
wsErr.Desc += "/" + wsErr.Details
1211+
}
12061212
if len(wsErr.Msg) <= 0 {
12071213
wsErr.Msg = string(truncate2k(body))
12081214
}

0 commit comments

Comments
 (0)