mirror of
https://github.com/LukeHagar/comfy-deploy-python.git
synced 2025-12-08 12:27:45 +00:00
init
This commit is contained in:
24
src/comfydeploy/models/errors/sdkerror.py
Normal file
24
src/comfydeploy/models/errors/sdkerror.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
|
||||
|
||||
import requests as requests_http
|
||||
|
||||
|
||||
class SDKError(Exception):
|
||||
"""Represents an error returned by the API."""
|
||||
message: str
|
||||
status_code: int
|
||||
body: str
|
||||
raw_response: requests_http.Response
|
||||
|
||||
def __init__(self, message: str, status_code: int, body: str, raw_response: requests_http.Response):
|
||||
self.message = message
|
||||
self.status_code = status_code
|
||||
self.body = body
|
||||
self.raw_response = raw_response
|
||||
|
||||
def __str__(self):
|
||||
body = ''
|
||||
if len(self.body) > 0:
|
||||
body = f'\n{self.body}'
|
||||
|
||||
return f'{self.message}: Status {self.status_code}{body}'
|
||||
Reference in New Issue
Block a user