Skip to content

Commit 7a63b19

Browse files
code health: rename error iproto code
Since 2.4.1 IPROTO_ERROR (0x31) is renamed to IPROTO_ERROR_24 and IPROTO_ERROR name is used for 0x52 constant describing extended error info [1]. 1. https://www.tarantool.io/en/doc/latest/dev_guide/internals/msgpack_extensions/#the-error-type Part of #209
1 parent 7330a14 commit 7a63b19

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

const.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const (
3535
KeyExpression = 0x27
3636
KeyDefTuple = 0x28
3737
KeyData = 0x30
38-
KeyError = 0x31
38+
KeyError24 = 0x31
3939
KeyMetaData = 0x32
4040
KeyBindCount = 0x34
4141
KeySQLText = 0x40

response.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (resp *Response) decodeBody() (err error) {
176176
if resp.Data, ok = res.([]interface{}); !ok {
177177
return fmt.Errorf("result is not array: %v", res)
178178
}
179-
case KeyError:
179+
case KeyError24:
180180
if resp.Error, err = d.DecodeString(); err != nil {
181181
return err
182182
}
@@ -261,7 +261,7 @@ func (resp *Response) decodeBodyTyped(res interface{}) (err error) {
261261
if err = d.Decode(res); err != nil {
262262
return err
263263
}
264-
case KeyError:
264+
case KeyError24:
265265
if resp.Error, err = d.DecodeString(); err != nil {
266266
return err
267267
}

0 commit comments

Comments
 (0)