def get_status_code()

in aidial_adapter_bedrock/server/exceptions.py [0:0]


    def get_status_code(self) -> int:
        match self:
            case BedrockExceptionCode.INTERNAL_SERVER:
                return 500
            case BedrockExceptionCode.MODEL_STREAM_ERROR:
                return 424
            case BedrockExceptionCode.MODEL_TIMEOUT:
                return 408
            case BedrockExceptionCode.SERVER_UNAVAILABLE:
                return 503
            case BedrockExceptionCode.THROTTLING:
                return 429
            case BedrockExceptionCode.VALIDATION:
                return 400
            case _:
                assert_never(self)