forked from rsocket/rsocket-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrorCode.h
More file actions
55 lines (50 loc) · 2.19 KB
/
ErrorCode.h
File metadata and controls
55 lines (50 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) Facebook, Inc. and its affiliates.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <cstdint>
#include <iosfwd>
namespace rsocket {
enum class ErrorCode : uint32_t {
RESERVED = 0x00000000,
// The Setup frame is invalid for the server (it could be that the client is
// too recent for the old server). Stream ID MUST be 0.
INVALID_SETUP = 0x00000001,
// Some (or all) of the parameters specified by the client are unsupported by
// the server. Stream ID MUST be 0.
UNSUPPORTED_SETUP = 0x00000002,
// The server rejected the setup, it can specify the reason in the payload.
// Stream ID MUST be 0.
REJECTED_SETUP = 0x00000003,
// The server rejected the resume, it can specify the reason in the payload.
// Stream ID MUST be 0.
REJECTED_RESUME = 0x00000004,
// The connection is being terminated. Stream ID MUST be 0.
CONNECTION_ERROR = 0x00000101,
// Application layer logic generating a Reactive Streams onError event.
// Stream ID MUST be non-0.
APPLICATION_ERROR = 0x00000201,
// Despite being a valid request, the Responder decided to reject it. The
// Responder guarantees that it didn't process the request. The reason for the
// rejection is explained in the metadata section. Stream ID MUST be non-0.
REJECTED = 0x00000202,
// The responder canceled the request but potentially have started processing
// it (almost identical to REJECTED but doesn't garantee that no side-effect
// have been started). Stream ID MUST be non-0.
CANCELED = 0x00000203,
// The request is invalid. Stream ID MUST be non-0.
INVALID = 0x00000204,
// EXT = 0xFFFFFFFF,
};
std::ostream& operator<<(std::ostream&, ErrorCode);
} // namespace rsocket