Add new Exception 0 Success 50 ~ 99 Product error 3000 ~ 3999 Internal service error 4000 ~ 4999 Conf error 5000 ~ 5999 User input error 6000 ~ 6999 Timeout error 7000 ~ 7999 Type Check error 8000 ~ 8999 Internal communication error 9000 ~
| 16 | _LOGGER = logging.getLogger(__name__) |
| 17 | |
| 18 | class CustomExceptionCode(enum.Enum): |
| 19 | """ |
| 20 | Add new Exception |
| 21 | |
| 22 | 0 Success |
| 23 | 50 ~ 99 Product error |
| 24 | 3000 ~ 3999 Internal service error |
| 25 | 4000 ~ 4999 Conf error |
| 26 | 5000 ~ 5999 User input error |
| 27 | 6000 ~ 6999 Timeout error |
| 28 | 7000 ~ 7999 Type Check error |
| 29 | 8000 ~ 8999 Internal communication error |
| 30 | 9000 ~ 9999 Inference error |
| 31 | 10000 Other error |
| 32 | """ |
| 33 | OK = 0 |
| 34 | PRODUCT_ERROR = 50 |
| 35 | |
| 36 | NOT_IMPLEMENTED = 3000 |
| 37 | CLOSED_ERROR = 3001 |
| 38 | NO_SERVICE = 3002 |
| 39 | INIT_ERROR = 3003 |
| 40 | CONF_ERROR = 4000 |
| 41 | INPUT_PARAMS_ERROR = 5000 |
| 42 | TIMEOUT = 6000 |
| 43 | TYPE_ERROR = 7000 |
| 44 | RPC_PACKAGE_ERROR = 8000 |
| 45 | CLIENT_ERROR = 9000 |
| 46 | UNKNOW = 10000 |
| 47 | |
| 48 | |
| 49 | class ProductErrCode(enum.Enum): |