sanmar_sdk.exceptions¶
Exceptions raised by the SanMar SDK.
Every error the SDK raises on purpose is a SanMarError, so one except clause is
enough to catch anything SanMar or the network did. Each is raised from the underlying
zeep, requests, or paramiko error, which stays available as __cause__.
Exceptions¶
Base class for every error the SDK raises. |
|
SanMar could not be reached, or answered with an HTTP error status. |
|
SanMar answered with a SOAP fault. |
|
SanMar's response could not be parsed, or did not match its own WSDL. |
|
SanMar reported an error for the request. |
|
SanMar rejected the credentials. |
|
The account is not authorized to use this service (PromoStandards code 104). |
|
SanMar has no record matching the request. |
|
SanMar rejected the request as malformed or out of range. |
|
A SanMar data file did not have the layout the SDK expects. |
Module Contents¶
- exception sanmar_sdk.exceptions.SanMarError[source]¶
Bases:
ExceptionBase class for every error the SDK raises.
- exception sanmar_sdk.exceptions.SanMarConnectionError[source]¶
Bases:
SanMarErrorSanMar could not be reached, or answered with an HTTP error status.
SanMar’s web services listen on port 8080, which some networks block outright.
- exception sanmar_sdk.exceptions.SoapFaultError(message: str, code: str | None = None)[source]¶
Bases:
SanMarErrorSanMar answered with a SOAP fault.
- exception sanmar_sdk.exceptions.ResponseError[source]¶
Bases:
SanMarErrorSanMar’s response could not be parsed, or did not match its own WSDL.
- exception sanmar_sdk.exceptions.ServiceError(message: str, code: int | None = None)[source]¶
Bases:
SanMarErrorSanMar reported an error for the request.
codeis the PromoStandards error code. SanMar’s own services report a message without a code, so it isNonefor them.
- exception sanmar_sdk.exceptions.AuthenticationError(message: str, code: int | None = None)[source]¶
Bases:
ServiceErrorSanMar rejected the credentials.
Web services use a SanMar.com username and password (plus the customer number for SanMar’s own services). EDEV has separate credentials from production, and the SFTP server has its own password.
- exception sanmar_sdk.exceptions.AuthorizationError(message: str, code: int | None = None)[source]¶
Bases:
ServiceErrorThe account is not authorized to use this service (PromoStandards code 104).
- exception sanmar_sdk.exceptions.NotFoundError(message: str, code: int | None = None)[source]¶
Bases:
ServiceErrorSanMar has no record matching the request.