Files
kittycad.py/kittycad/models/error_code.py
Jess Frazelle 8162fa1964 Update api spec (#127)
* YOYO NEW API SPEC!

* bump version

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* some fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes #128

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* mypy fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-30 15:59:51 -07:00

24 lines
1.2 KiB
Python

from enum import Enum
class ErrorCode(str, Enum):
"""The type of error sent by the KittyCAD API.""" # noqa: E501
"""# Graphics engine failed to complete request, consider retrying """ # noqa: E501
INTERNAL_ENGINE = "internal_engine"
"""# API failed to complete request, consider retrying """ # noqa: E501
INTERNAL_API = "internal_api"
"""# 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. """ # noqa: E501
BAD_REQUEST = "bad_request"
"""# Client sent invalid JSON. """ # noqa: E501
INVALID_JSON = "invalid_json"
"""# Problem sending data between client and KittyCAD API. """ # noqa: E501
CONNECTION_PROBLEM = "connection_problem"
"""# Client sent a Websocket message type which the KittyCAD API does not handle. """ # noqa: E501
MESSAGE_TYPE_NOT_ACCEPTED = "message_type_not_accepted"
"""# Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection. """ # noqa: E501
MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C = "message_type_not_accepted_for_web_r_t_c"
def __str__(self) -> str:
return str(self.value)