server

server.bad_gateway_error

exception lscore.errors.server_errors.BadGatewayError(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that an error occurred communicating with a secondary gateway.

HTTP code: 502 Bad Gateway
Example: Invalid response returned from the gateway: None
type = 'server.bad_gateway_error'
localizable_message = <LocalizableMessage key='server.bad_gateway_error' ...>
code = '502 Bad Gateway'
exception lsserver.payment_gateway.merchantware.genius.genius_terminal.GeniusLineItemDisplayError(message)

Bases: lscore.errors.server_errors.BadGatewayError, lsserver.payment_gateway.merchantware.genius.genius_terminal.GeniusTerminalError

HTTP code: 502 Bad Gateway
Example: Invalid response returned from the gateway: None

server.bad_gateway_error.server_daemon_communication_error

exception lsserver.server_daemon.errors.ServerDaemonCommunicationError(socket)

Bases: lscore.errors.server_errors.BadGatewayError

A base error for exceptions related to communications with the LightSpeed backup daemon.

Parameters:socket (string) – The path to socket which caused the error.
HTTP code: 502 Bad Gateway
Example: Cannot communicate with backup daemon on socket (None).
type = 'server.bad_gateway_error.server_daemon_communication_error'
localizable_message = <LocalizableMessage key='server.bad_gateway_error.server_daemon_communication_error' ...>

server.bad_gateway_error.server_daemon_communication_error.server_daemon_configuration_error

exception lsserver.server_daemon.errors.ServerDaemonConfigurationError(socket)

Bases: lsserver.server_daemon.errors.ServerDaemonCommunicationError

An error which can be raised as a result of failing to communicate with the LightSpeed backup daemon. This error might be used, for example, if the expected socket does not exist, or LSS has insufficient privileves to use the socket, etc.

Parameters:socket (string) – The path to socket which caused the error.
HTTP code: 502 Bad Gateway
Example: Invalid server daemon configuration using socket None
type = 'server.bad_gateway_error.server_daemon_communication_error.server_daemon_configuration_error'
localizable_message = <LocalizableMessage key='server.bad_gateway_error.server_daemon_communication_error.server_daemon_configuration_error' ...>

server.bad_gateway_error.server_daemon_communication_error.server_daemon_timeout_error

exception lsserver.server_daemon.errors.ServerDaemonTimeoutError(socket)

Bases: lsserver.server_daemon.errors.ServerDaemonCommunicationError

An error which can be raised when a request to the LightSpeed backup daemon times out.

Parameters:socket (string) – The path to socket which caused the error.
HTTP code: 502 Bad Gateway
Example: Request timed out while waiting for backup daemon to reply.
type = 'server.bad_gateway_error.server_daemon_communication_error.server_daemon_timeout_error'
localizable_message = <LocalizableMessage key='server.bad_gateway_error.server_daemon_communication_error.server_daemon_timeout_error' ...>

server.bad_request

exception lscore.errors.server_errors.BadRequest(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that the request was malformed.

HTTP code: 400 Bad Request
Localized Key: server.bad_request
Example: Bad Request: None
type = 'server.bad_request'
localizable_message = <LocalizableMessage key='server.bad_request' ...>
code = '400 Bad Request'
exception lscore.scheduling.scheduler.InvalidSchedule(message=None, **kwargs)

Bases: lscore.errors.server_errors.BadRequest, lscore.scheduling.scheduler.SchedulerError

HTTP code: 400 Bad Request
Localized Key: server.bad_request
Example: Bad Request: None
exception lsserver.payment_gateway.moneris.moneris_task.MissingPaymentID(message)

Bases: lscore.errors.server_errors.BadRequest, lsserver.payment_gateway.moneris.moneris_task.MonerisTaskError

HTTP code: 400 Bad Request
Localized Key: server.bad_request
Example: Bad Request: None
exception lsserver.payment_gateway.moneris.moneris_task.MissingApprovalNumber(message)

Bases: lscore.errors.server_errors.BadRequest, lsserver.payment_gateway.moneris.moneris_task.MonerisTaskError

HTTP code: 400 Bad Request
Localized Key: server.bad_request
Example: Bad Request: None
exception lsserver.controller.command.errors.CommandParameterError(message=None)

Bases: lscore.errors.server_errors.BadRequest, lsserver.controller.command.errors.CommandError

Indicates Missing or invalid Parameters

HTTP code: 400 Bad Request
Localized Key: server.bad_request
Example: Bad Request: None
exception lsserver.reporting.report_base.ValidationError(filter, caused_by_error=None)

Bases: lscore.errors.server_errors.BadRequest, lsserver.reporting.report_base.ReportError

Base for value validation

HTTP code: 400 Bad Request
Localized Key: server.bad_request
Example: Bad Request: None

server.forbidden

exception lscore.errors.server_errors.Forbidden(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that the request is forbidden.

HTTP code: 403 Forbidden
Localized Key: server.forbidden
Example: Forbidden Request: None
type = 'server.forbidden'
localizable_message = <LocalizableMessage key='server.forbidden' ...>
code = '403 Forbidden'
exception lsserver.lib.access_log.log.CannotAlterLogError(message=None, **kwargs)

Bases: lscore.errors.server_errors.Forbidden

HTTP code: 403 Forbidden
Localized Key: server.forbidden
Example: Forbidden Request: None
exception lsserver.payment_gateway.merchantware.genius.genius_terminal.GeniusLineItemDisplayAccessDenied(message)

Bases: lscore.errors.server_errors.Forbidden, lsserver.payment_gateway.merchantware.genius.genius_terminal.GeniusTerminalError

HTTP code: 403 Forbidden
Localized Key: server.forbidden
Example: Forbidden Request: None
exception lsserver.payment_gateway.merchantware.genius.genius_terminal.GeniusLineItemDisplayBusyError(message=None)

Bases: lscore.errors.server_errors.Forbidden, lsserver.payment_gateway.merchantware.genius.genius_terminal.GeniusTerminalError

HTTP code: 403 Forbidden
Localized Key: server.forbidden
Example: Forbidden Request: None

server.legacy_error

exception lscore.errors.server_errors.LegacyError(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

This error type indicate an error in a legacy piece of code will not be fixed.

Parameters:message (str) – Any message.
HTTP code: 500 Internal Server Error
Example: Invalid response returned from the gateway: None
type = 'server.legacy_error'
localizable_message = <LocalizableMessage key='server.bad_gateway_error' ...>

server.lightspeederror

exception lscore.versioning.dotversion.MalformedVersion(version_string)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

HTTP code: 500 Internal Server Error
Localized Key: server.lightspeederror
Example: An unexpected error occurred.
exception lsserver.context.user_agent.MalformedUserAgent(version_string)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

HTTP code: 500 Internal Server Error
Localized Key: server.lightspeederror
Example: An unexpected error occurred.

server.not_acceptable

exception lscore.errors.server_errors.NotAcceptable(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that the contents of the request are not acceptable.

HTTP code: 406 Not Acceptable
Localized Key: server.not_acceptable
Example: Not Acceptable: None
type = 'server.not_acceptable'
localizable_message = <LocalizableMessage key='server.not_acceptable' ...>
code = '406 Not Acceptable'
exception lsserver.domain_model.model_exceptions.CancelResourceException(error_type=None, error_message=None, key=None)

Bases: lscore.errors.server_errors.NotAcceptable, lsserver.domain_model.model_exceptions.ModelError

Create_resource and modify_resource should raise this exception if something occurs that should not complete creating the resource and/or add a sub resource to its parent.

@param error_type: a short code describing the error. @param error_message: A human-readable description of the error message.

HTTP code: 406 Not Acceptable
Localized Key: server.not_acceptable
Example: Not Acceptable: None

server.not_found

exception lscore.errors.server_errors.NotFound(resource=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that the request item (or sub item) was not found.

HTTP code: 404 Not Found
Localized Key: server.not_found
Example: Not Found: None
type = 'server.not_found'
localizable_message = <LocalizableMessage key='server.not_found' ...>
code = '404 Not Found'
exception lscore.scheduling.scheduler.UnknownJobName(job_name)

Bases: lscore.errors.server_errors.NotFound, lscore.scheduling.scheduler.SchedulerError

HTTP code: 404 Not Found
Localized Key: server.not_found
Example: Not Found: None
exception lsserver.controller.command.errors.ResourceUnavailableError(message=None)

Bases: lscore.errors.server_errors.NotFound, lsserver.controller.command.errors.CommandError

Indicates missing resource

HTTP code: 404 Not Found
Localized Key: server.not_found
Example: Not Found: None

server.not_implemented_error

exception lscore.errors.server_errors.NotImplementedError(function=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that the requested operation is not implemented

HTTP code: 501 Not Implemented
Localized Key: server.not_implemented
Example: Function ‘None’ is not implemented
type = 'server.not_implemented_error'
localizable_message = <LocalizableMessage key='server.not_implemented' ...>
code = '501 Not Implemented'

server.precondition_failed

exception lscore.errors.server_errors.PreconditionFailed(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that the contents of the request are not acceptable.

HTTP code: 412 Precondition Failed
Example: Precondition Failed: None
type = 'server.precondition_failed'
localizable_message = <LocalizableMessage key='server.precondition_failed' ...>
code = '412 Precondition Failed'
exception lscore.rest.mapping.IncorrectVersion(message=None, **kwargs)

Bases: lscore.errors.server_errors.PreconditionFailed

Raised to indicate that the required version is incorrect.

HTTP code: 412 Precondition Failed
Example: Precondition Failed: None

server.server_error

exception lscore.errors.server_errors.ServerError(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Base type for generic HTTP 500 error. Minimum base type for server errors.

HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
type = 'server.server_error'
localizable_message = <LocalizableMessage key='server.server_error' ...>
exception lscore.locking.locking_base.LockingError(message=None)

Bases: lscore.errors.server_errors.ServerError

HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
exception lscore.locking.locking_base.NotLockHolderError(message=None, current_lock_holder=None)

Bases: lscore.locking.locking_base.LockingError

HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
current_lock_holder
exception lscore.locking.locking_base.LockAlreadyReleasedError(message=None)

Bases: lscore.locking.locking_base.LockingError

HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
exception lsserver.file_system.errors.StdFileError(message, file, caused_by=None, **kwargs)

Bases: lscore.errors.server_errors.ServerError, lsserver.file_system.errors.FileTransactionError

A base exception class used for file-related errors.

Parameters:
  • message (string) – a textual message explaining the error
  • file (string) – path to the file
  • caused_by (Exception) – an exception which preceded this exception’s creation
HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
exception lsserver.file_system.errors.FileMoveError(message, source, destination, caused_by=None)

Bases: lsserver.file_system.errors.StdFileError

An error indicating that attempting to move a file or directory from one location to another on the filesystem failed.

Parameters:
  • message (string) – a textual message explaining the error
  • source (string) – the file or directory to be moved
  • destination (string) – the new location for source
  • caused_by (Exception) – an exception which preceded this exception’s creation
HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
exception lsserver.file_system.errors.FileNoDataError(message, file, caused_by=None, **kwargs)

Bases: lsserver.file_system.errors.StdFileError

An error indicating that a file write was issued but not data was provided for the write operation.

Parameters:
  • message (string) – a textual message explaining the error
  • file (string) – path to the file
  • caused_by (Exception) – an exception which preceded this exception’s creation
HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
exception lsserver.payment_gateway.ingenico.ingenico.IngenicoBadStateError(message=None, **kwargs)

Bases: lscore.errors.server_errors.ServerError, lsserver.payment_gateway.ingenico.ingenico.IngenicoError

HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None
exception lsserver.controller.command.errors.CancelCommandException(error_type, error_message, caused_by_error=None)

Bases: lscore.errors.server_errors.ServerError, lsserver.controller.command.errors.CommandError

Commands should raise this exception if something occurs that should not/could not complete

@param error_type: a short code describing the error. @param error_message: A human-readable description of the error message.

HTTP code: 500 Internal Server Error
Localized Key: server.server_error
Example: Generic server error: None

server.service_unavailable

exception lscore.errors.server_errors.ServiceUnavailable(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that user is attempting to reach a service which the server can’t currently handle due to a temporary overloading or maintenance of the server.

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
type = 'server.service_unavailable'
localizable_message = <LocalizableMessage key='server.service_unavailable' ...>
code = '503 Service Unavailable'
exception lsserver.user.user_service.UserServiceUnavailable(message=None, **kwargs)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.user.user_service.UserServiceError

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.advanced_reporting.uploader.ARStatusReadError(message=None, **kwargs)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.advanced_reporting.uploader.AdvancedReportingError

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.advanced_reporting.uploader.ARServiceUnavailable(http_503_error)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.advanced_reporting.uploader.AdvancedReportingError

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.ratatosk.errors.RATATOSKStatusReadError(message=None, **kwargs)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.ratatosk.errors.RATATOSKError

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.ratatosk.errors.RATATOSKServiceUnavailable(http_503_error)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.ratatosk.errors.RATATOSKError

Defines backoff handling for 503 errors in ratatosk.

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.ratatosk.errors.RATATOSKGatewayTimeoutError(http_503_error)

Bases: lsserver.ratatosk.errors.RATATOSKServiceUnavailable

In testing we’ve noticed that 504 errors occur during scaling activities. As such we use the same backoff approach as for 503’s. Technically, a 504 shouldn’t have a ‘Retry-After’ header. But it doesn’t hurt to look for it.

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.heimdall.errors.HeimdallStatusReadError(message=None, **kwargs)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.heimdall.errors.HeimdallError

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.heimdall.errors.HeimdallServiceUnavailable(http_503_error)

Bases: lscore.errors.server_errors.ServiceUnavailable, lsserver.heimdall.errors.HeimdallError

Defines backoff handling for 503 errors in heimdall.

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None
exception lsserver.heimdall.errors.HeimdallGatewayTimeoutError(http_503_error)

Bases: lsserver.heimdall.errors.HeimdallServiceUnavailable

In testing we’ve noticed that 504 errors occur during scaling activities. As such we use the same backoff approach as for 503’s. Technically, a 504 shouldn’t have a ‘Retry-After’ header. But it doesn’t hurt to look for it.

HTTP code: 503 Service Unavailable
Example: Service Unavailable: None

server.unauthorized

exception lscore.errors.server_errors.Unauthorized(message=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Indicates that user making the request is not authorized to do so.

HTTP code: 401 Unauthorized
Localized Key: server.unauthorized
Example: Unauthorized Request: None
type = 'server.unauthorized'
localizable_message = <LocalizableMessage key='server.unauthorized' ...>
code = '401 Unauthorized'

server.unexpected_error

exception lscore.errors.server_errors.UnexpectedError(action=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Generic Error for raising a user-friendly unexpected error.

HTTP code: 500 Internal Server Error
Example: Unexpected error performing action: None
type = 'server.unexpected_error'
localizable_message = <LocalizableMessage key='server.unexpected_error' ...>

server.unhandled_exception

exception lscore.errors.server_errors.UnhandledException(caused_by_error=None, **kwargs)

Bases: lscore.errors.lightspeed_errors.LightSpeedError

Generic Error for raising a user-friendly unhandled error

Note

Not commonly used.

Creates the base error type for all lightspeed errors.

Parameters:
  • caused_by_error – Optional inner error.
  • kwargs – The list of parameters to be passed to the localizable_message

See also

core.localizations.keys

HTTP code: 500 Internal Server Error
Example: An unexpected error occurred.
type = 'server.unhandled_exception'
localizable_message = <LocalizableMessage key='server.unhandled_exception' ...>