20#ifndef ORES_UTILITY_SERIALIZATION_ERROR_CODE_HPP
21#define ORES_UTILITY_SERIALIZATION_ERROR_CODE_HPP
26#include <magic_enum/magic_enum.hpp>
28namespace ores::utility::serialization {
38 version_mismatch = 0x0001,
39 crc_validation_failed = 0x0002,
40 invalid_message_type = 0x0003,
41 handshake_timeout = 0x0004,
42 handshake_failed = 0x0005,
43 payload_too_large = 0x0006,
44 network_error = 0x0007,
45 handler_error = 0x0008,
46 database_error = 0x0009,
47 authentication_failed = 0x000A,
48 authorization_failed = 0x000B,
49 invalid_request = 0x000C,
50 bootstrap_mode_only = 0x000D,
51 bootstrap_mode_forbidden = 0x000E,
52 weak_password = 0x000F,
53 not_localhost = 0x0010,
54 database_unavailable = 0x0011,
55 decompression_failed = 0x0012,
56 unsupported_compression = 0x0013,
57 compression_failed = 0x0014,
58 signup_disabled = 0x0015,
59 username_taken = 0x0016,
61 signup_requires_authorization = 0x0018,
62 payload_incomplete = 0x0019,
63 limit_exceeded = 0x001A,
73inline std::ostream& operator<<(std::ostream& os, error_code ec) {
74 return os << magic_enum::enum_name(ec)
75 <<
" (0x" << std::hex << static_cast<std::uint16_t>(ec) << std::dec <<
")";
81inline std::string to_string(error_code ec) {
82 return std::string(magic_enum::enum_name(ec));
error_code
Error codes returned by service-layer request helpers.
Definition error_code.hpp:28