antirez / antirez/RESP3

Blob Error Code & Verbatim Type code question

Đang mở
#26 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
230
Fork
41
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The spec says (for simple errors)

> The first word in the error is in upper case and describes the error code. The remaining string is the error message itself. The `ERR` error code is the generic one. The error code is useful for clients to distinguish among different error conditions without having to do pattern matching in the error message, that may change.

and (for blob errors)

> The general form is `!\r\n\r\n`. It is exactly like the String type. However like the Simple error type, the first uppercase word represents the error code.

So am I correct in assuming that the error code **must**

1. be upper-case only, or not contain anything other than `A-Z0-9-_` or some other limited character set?
2. be at the start of the error string?
3. be separated from the rest of the error by a space ` `?

----

For the **verbatim** type, does the 3 character type marker have constraints? I assume it can't be `` or ``, but perhaps keeping it within the ASCII printable range?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.