Current section

Files

Jump to
kafka_protocol include kpro_error_code.hrl
Raw

include/kpro_error_code.hrl

%%% Copyright (c) 2017, Klarna AB
%%%
%%% 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.
-ifndef(KPRO_ERROR_DODE_HRL).
-define(KPRO_ERROR_DODE_HRL, true).
%% Error code macros, from:
%% https://github.com/apache/kafka/blob/0.10.2/
%% clients/src/main/java/org/apache/kafka/common/protocol/Errors.java
-define(EC_UNKNOWN, 'UnknownError'). % -1
-define(EC_NONE, 'no_error'). % 0
-define(EC_OFFSET_OUT_OF_RANGE, 'OffsetOutOfRange'). % 1
-define(EC_CORRUPT_MESSAGE, 'CorruptMessage'). % 2
-define(EC_UNKNOWN_TOPIC_OR_PARTITION, 'UnknownTopicOrPartition'). % 3
-define(EC_INVALID_MESSAGE_SIZE, 'InvalidMessageSize'). % 4
-define(EC_LEADER_NOT_AVAILABLE, 'LeaderNotAvailable'). % 5
-define(EC_NOT_LEADER_FOR_PARTITION, 'NotLeaderForPartition'). % 6
-define(EC_REQUEST_TIMED_OUT, 'RequestTimedOut'). % 7
-define(EC_BROKER_NOT_AVAILABLE, 'BrokerNotAvailable'). % 8
-define(EC_REPLICA_NOT_AVAILABLE, 'ReplicaNotAvailable'). % 9
-define(EC_MESSAGE_TOO_LARGE, 'MessageTooLarge'). % 10
-define(EC_STALE_CONTROLLER_EPOCH, 'StaleControllerEpoch'). % 11
-define(EC_OFFSET_METADATA_TOO_LARGE, 'OffsetMetadataTooLarge'). % 12
-define(EC_NETWORK_EXCEPTION, 'NetworkException'). % 13
-define(EC_GROUP_LOAD_IN_PROGRESS, 'GroupLoadInProgress'). % 14
-define(EC_GROUP_COORDINATOR_NOT_AVAILABLE,
'GroupCoordinatorNotAvailable'). % 15
-define(EC_NOT_COORDINATOR_FOR_GROUP, 'NotCoordinatorForGroup'). % 16
-define(EC_INVALID_TOPIC_EXCEPTION, 'InvalidTopicException'). % 17
-define(EC_MESSAGE_LIST_TOO_LARGE, 'MessageListTooLargeException'). % 18
-define(EC_NOT_ENOUGH_REPLICAS, 'NotEnoughReplicasException'). % 19
-define(EC_NOT_ENOUGH_REPLICAS_AFTER_APPEND,
'NotEnoughReplicasAfterAppendException'). % 20
-define(EC_INVALID_REQUIRED_ACKS, 'InvalidRequiredAcks'). % 21
-define(EC_ILLEGAL_GENERATION, 'IllegalGeneration'). % 22
-define(EC_INCONSISTENT_GROUP_PROTOCOL, 'InconsistentGroupProtocol'). % 23
-define(EC_INVALID_GROUP_ID, 'InvalidGroupId'). % 24
-define(EC_UNKNOWN_MEMBER_ID, 'UnknownMemberId'). % 25
-define(EC_INVALID_SESSION_TIMEOUT, 'InvalidSessionTimeout'). % 26
-define(EC_REBALANCE_IN_PROGRESS, 'RebalanceInProgress'). % 27
-define(EC_INVALID_COMMIT_OFFSET_SIZE, 'InvalidCommitOffsetSize'). % 28
-define(EC_TOPIC_AUTHORIZATION_FAILED, 'TopicAuthorizationFailed'). % 29
-define(EC_GROUP_AUTHORIZATION_FAILED, 'GroupAuthorizationFailed'). % 30
-define(EC_CLUSTER_AUTHORIZATION_FAILED, 'ClusterAuthorizationFailed'). % 31
-define(EC_UNSUPPORTED_SASL_MECHANISM, 'UnsupportedSaslMechanism'). % 33
-define(EC_ILLEGAL_SASL_STATE, 'IllegalSaslState'). % 34
-define(EC_UNSUPPORTED_VERSION, 'UnsupportedVersion'). % 35
-define(EC_TOPIC_ALREADY_EXISTS, 'TopicExists'). % 36
-define(EC_INVALID_PARTITIONS, 'InvalidPartitions'). % 37
-define(EC_INVALID_REPLICATION_FACTOR, 'InvalidReplicationFactor'). % 38
-define(EC_INVALID_REPLICA_ASSIGNMENT, 'InvalidReplicaAssignment'). % 39
-define(EC_INVALID_CONFIG, 'InvalidConfiguration'). % 40
-define(EC_NOT_CONTROLLER, 'NotController'). % 41
-define(EC_INVALID_REQUEST, 'InvalidRequest'). % 42
-define(EC_UNSUPPORTED_FOR_MESSAGE_FORMAT,
'UnsupportedForMessageFormat'). % 43
-define(EC_POLICY_VIOLATION, 'PolicyViolation'). % 44
-endif.
%%%_* Emacs ====================================================================
%%% Local Variables:
%%% allout-layout: t
%%% erlang-indent-level: 2
%%% End: