kittycad.models.error_code
Classes
|
The type of error sent by the KittyCAD API. |
- class kittycad.models.error_code.ErrorCode(value)[source][source]
The type of error sent by the KittyCAD API.
- CONNECTION_PROBLEM = 'connection_problem'[source]
# Client sent a Websocket message type which the KittyCAD API does not handle.
- INTERNAL_API = 'internal_api'[source]
# User requested something geometrically or graphically impossible. Don’t retry this request, as it’s inherently impossible. Instead, read the error message and change your request.
- INVALID_BSON = 'invalid_bson'[source]
# Client sent a message which is not accepted over this protocol.
- MESSAGE_TYPE_NOT_ACCEPTED = 'message_type_not_accepted'[source]
# Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection.
- __dict__ = mappingproxy({'_generate_next_value_': <function Enum._generate_next_value_>, '__module__': 'kittycad.models.error_code', '__doc__': 'The type of error sent by the KittyCAD API.', '__str__': <function ErrorCode.__str__>, '__dict__': <attribute '__dict__' of 'ErrorCode' objects>, '__weakref__': <attribute '__weakref__' of 'ErrorCode' objects>, '_member_names_': ['INTERNAL_ENGINE', 'INTERNAL_API', 'BAD_REQUEST', 'INVALID_JSON', 'INVALID_BSON', 'WRONG_PROTOCOL', 'CONNECTION_PROBLEM', 'MESSAGE_TYPE_NOT_ACCEPTED', 'MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C'], '_member_map_': {'INTERNAL_ENGINE': <ErrorCode.INTERNAL_ENGINE: 'internal_engine'>, 'INTERNAL_API': <ErrorCode.INTERNAL_API: 'internal_api'>, 'BAD_REQUEST': <ErrorCode.BAD_REQUEST: 'bad_request'>, 'INVALID_JSON': <ErrorCode.INVALID_JSON: 'invalid_json'>, 'INVALID_BSON': <ErrorCode.INVALID_BSON: 'invalid_bson'>, 'WRONG_PROTOCOL': <ErrorCode.WRONG_PROTOCOL: 'wrong_protocol'>, 'CONNECTION_PROBLEM': <ErrorCode.CONNECTION_PROBLEM: 'connection_problem'>, 'MESSAGE_TYPE_NOT_ACCEPTED': <ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED: 'message_type_not_accepted'>, 'MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C': <ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C: 'message_type_not_accepted_for_web_r_t_c'>}, '_member_type_': <class 'str'>, '_value2member_map_': {'internal_engine': <ErrorCode.INTERNAL_ENGINE: 'internal_engine'>, 'internal_api': <ErrorCode.INTERNAL_API: 'internal_api'>, 'bad_request': <ErrorCode.BAD_REQUEST: 'bad_request'>, 'invalid_json': <ErrorCode.INVALID_JSON: 'invalid_json'>, 'invalid_bson': <ErrorCode.INVALID_BSON: 'invalid_bson'>, 'wrong_protocol': <ErrorCode.WRONG_PROTOCOL: 'wrong_protocol'>, 'connection_problem': <ErrorCode.CONNECTION_PROBLEM: 'connection_problem'>, 'message_type_not_accepted': <ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED: 'message_type_not_accepted'>, 'message_type_not_accepted_for_web_r_t_c': <ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C: 'message_type_not_accepted_for_web_r_t_c'>}, 'INTERNAL_ENGINE': <ErrorCode.INTERNAL_ENGINE: 'internal_engine'>, 'INTERNAL_API': <ErrorCode.INTERNAL_API: 'internal_api'>, 'BAD_REQUEST': <ErrorCode.BAD_REQUEST: 'bad_request'>, 'INVALID_JSON': <ErrorCode.INVALID_JSON: 'invalid_json'>, 'INVALID_BSON': <ErrorCode.INVALID_BSON: 'invalid_bson'>, 'WRONG_PROTOCOL': <ErrorCode.WRONG_PROTOCOL: 'wrong_protocol'>, 'CONNECTION_PROBLEM': <ErrorCode.CONNECTION_PROBLEM: 'connection_problem'>, 'MESSAGE_TYPE_NOT_ACCEPTED': <ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED: 'message_type_not_accepted'>, 'MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C': <ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C: 'message_type_not_accepted_for_web_r_t_c'>, '__repr__': <function Enum.__repr__>, '__format__': <function Enum.__format__>, '__new__': <function Enum.__new__>, '__annotations__': {}})[source]
- _generate_next_value_(start, count, last_values)[source]
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None
- _member_map_ = {'BAD_REQUEST': ErrorCode.BAD_REQUEST, 'CONNECTION_PROBLEM': ErrorCode.CONNECTION_PROBLEM, 'INTERNAL_API': ErrorCode.INTERNAL_API, 'INTERNAL_ENGINE': ErrorCode.INTERNAL_ENGINE, 'INVALID_BSON': ErrorCode.INVALID_BSON, 'INVALID_JSON': ErrorCode.INVALID_JSON, 'MESSAGE_TYPE_NOT_ACCEPTED': ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED, 'MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C': ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C, 'WRONG_PROTOCOL': ErrorCode.WRONG_PROTOCOL}[source]
- _member_names_ = ['INTERNAL_ENGINE', 'INTERNAL_API', 'BAD_REQUEST', 'INVALID_JSON', 'INVALID_BSON', 'WRONG_PROTOCOL', 'CONNECTION_PROBLEM', 'MESSAGE_TYPE_NOT_ACCEPTED', 'MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C'][source]
- _value2member_map_ = {'bad_request': ErrorCode.BAD_REQUEST, 'connection_problem': ErrorCode.CONNECTION_PROBLEM, 'internal_api': ErrorCode.INTERNAL_API, 'internal_engine': ErrorCode.INTERNAL_ENGINE, 'invalid_bson': ErrorCode.INVALID_BSON, 'invalid_json': ErrorCode.INVALID_JSON, 'message_type_not_accepted': ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED, 'message_type_not_accepted_for_web_r_t_c': ErrorCode.MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C, 'wrong_protocol': ErrorCode.WRONG_PROTOCOL}[source]