Files
cleverswarm-python-client/src/cleverswarm_python_client/libs/exceptions.py
T
2025-09-27 20:55:31 +01:00

99 lines
1.9 KiB
Python

"""
Module that contains Exceptions that maybe thrown by the Benchmark client.
Copyright (c) 2016 - present Syncleus, Inc.
Copyright (c) 2016 - present CleverThis, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
class ClientException(Exception):
"""
Client exception occurred.
"""
pass
class BaseUrlMissingException(ClientException):
"""
Base URL is missing. No REST operations are possible.
"""
pass
class InvalidUsernameOrPasswordException(ClientException):
"""
Invalid username or password.
"""
pass
class UnexpectedConditionException(ClientException):
"""
Something unexpected happened during processing. Some unhandled case that should not occur.
"""
pass
class RequestErrorException(ClientException):
"""
Request is badly formatted or server error occurred.
"""
pass
class ConnectionErrorException(ClientException):
"""
Failed to connect to server.
"""
pass
class ConnectionTimeoutException(ClientException):
"""
Connection to server timed out.
"""
pass
class JobNotFoundException(ClientException):
"""
Job not found.
"""
pass
class UnauthorizedException(ClientException):
"""
Unauthorized exception. Either user is not logged in or is not authorized to do the operation.
"""
pass
class InvalidFileException(ClientException):
"""
File is not valid.
"""
pass