Fred de Gier 283668448d
Dev (#148)
* Create publish-docker-images.yaml

* Add copilot_proxy publishing

* Add model_converter publishing

* Use dockerhub version

* Do not login for PRs

* Overwrite some of labels value

* Move ignore files to the root of `context`

* Add comments & fix some issue

* Fix typos

* Remove the target of the master branch

* Delete .dockerignore

* Delete .dockerignore

* Add Flake8

* Add Flake8 and format code accordingly

* Iterate on the PR template, fix the token for the contributor action

* Remove converter image build

* Update Dockerfile of proxy

* Comment out proxy image in compose

Co-authored-by: Fred de Gier <freddegier@me.com>

* Fix build action

---------

Co-authored-by: Rowe Wilson Frederisk Holme <frederisk@outlook.com>
2023-02-15 09:17:07 +01:00

22 lines
605 B
Python

from typing import Optional
class FauxPilotException(Exception):
def __init__(self, message: str, error_type: Optional[str] = None, param: Optional[str] = None,
code: Optional[int] = None):
super().__init__(message)
self.message = message
self.error_type = error_type
self.param = param
self.code = code
def json(self):
return {
'error': {
'message': self.message,
'type': self.error_type,
'param': self.param,
'code': self.code
}
}