Exceptions
API Exceptions.

Explanation of API Exceptions

Http Status Code

The HTTP status code should be the first place to look for what went right or wrong.

StatusDescription
200Success. See payload for response.
201Success. Resource created. See payload for response.
202Accepted. Further processing is taking place asynchronously. Payload will typically contain an async status link for polling completion status.
204Success. No response payload -- intentionally left blank.
400Bad request. See payload for more information. If the content-type is application/json, it will be one of the exceptions listed below.
401Unauthorized. Missing Authorization header with proper bearer token.
403Forbidden. Either the credentials do not allow accessing the resource with the HTTP method used, or the operation is forbidden such as attempting to delete a customer in use. If the content-type is application/json, it will be one of the exceptions listed below.
404Not found. Resource doesn't exist.
412Precondition failed. The If-Match header specified doesn't match the current state of the resource.
428Precondition required. If-Match header required.
500Server error. See the payload for further information. It will be plain text, NOT one of exception types listed below.

Wire Format

The following exceptions go over the wire from the API service.
In order for the type to be deterministic, they are all emitted with Newtonsoft's serialization setting of "TypeNameHandling = TypeNameHandling.Objects".
For example, a QueryParameterException might appear as follows:

{
"$type": "WMS.V2.Generic.Models.Exceptions.QueryParameterException, WMS.V2.Generic.Models",
"Parameters": ["rql"],
"ErrorCode": "NotParsable",
"Hint": "Properties not supported: gorp"
}
NameTypeDescription
Generic.Models.Exceptions.AuthorizationExceptionWmsExceptionBase-derived with ErrorCode values from enum AuErrorCode
ErrorCode string could have been a number, but is a short string for human readability; not to be localized
Hint string helpful word or two if the thrower happens to know more things; not to be localized
Generic.Models.Exceptions.ListExceptioncontainer of WmsExceptionBase-derived exceptions occuring during actions on lists, such as import or mass ops
Faults IList<Generic.Models.Exceptions.ListEntryFault>
EntryNumber int 1-indexed position in the source list
WmsException Generic.Models.Exceptions.WmsExceptionBase for more details at runtime see which WmsExceptionBase-derived exception it is
ErrorCode string could have been a number, but is a short string for human readability; not to be localized
Hint string helpful word or two if the thrower happens to know more things; not to be localized
Message string
InnerException System.Exception
Generic.Models.Exceptions.ModelValidationExceptionWmsExceptionBase-derived with ErrorCode values from enum MvErrorCode; Hints are enum MvValueNotSupportedHint
ModelType Generic.Models.Exceptions.ModelType
- 0: Api
- 1: Orm
- 2: Other
Properties Generic.Models.Exceptions.ModelProperty[] Name/Values of the offending properties, not other circumstantial properties
Name string
Value string
ErrorCode string could have been a number, but is a short string for human readability; not to be localized
Hint string helpful word or two if the thrower happens to know more things; not to be localized
Generic.Models.Exceptions.OperationExceptionWmsExceptionBase-derived with ErrorCode values from enum OpErrorCode
ActionNameType Generic.Models.Exceptions.ActionNameType explains whether ActionName is a controller method or an API model
- 0: Rel
- 1: ClassName
- 2: Parser
ActionName string where the operation exception was detected
ErrorCode string could have been a number, but is a short string for human readability; not to be localized
Hint string helpful word or two if the thrower happens to know more things; not to be localized
Generic.Models.Exceptions.QueryParameterExceptionWmsExceptionBase-derived with ErrorCode values from enum QpErrorCOde
Parameters String[] offending query parameter names
ErrorCode string could have been a number, but is a short string for human readability; not to be localized
Hint string helpful word or two if the thrower happens to know more things; not to be localized

ErrorCode values for the exceptions listed above include:

TypeErrorCodeDescription
ModelValidationModel properties in request payload wrong; see associated Properties array for which properties; results in Status 400
RequiredRequired property missing, such as an order ReferenceNum.
DoesNotExistProperty value refers to a non-existing record, such as a specified Sku doesn't exist.
DuplicateProperty, if added to the database, would result in a disallowed duplicate, such as a duplicate order ReferenceNum
IncompatibleTwo or more properties have conflicting values, such as location to be contained in an audit is not in the audit's facility.
ValueNotSupportedProperty value outside the domain of allowed values, such as a negative number not allowed.
OperationExceptionOperation requested not possible; results in Status 403
InUseRecord can't be deleted because it contains references
WrongCustomerInBatchOrder can't be added to batch for different customer
MixedFacilitiesInBatchOrder can't be added to batch resulting in multiple facilities
OrderConfirmedOrder can't be completed or split because it's confirmed
AlreadyCompletedOrder already completed so can't be completed again
NotFullyAllocatedOrder can't be confirmed because it's not fully allocated
DateInFutureOrder can't be confirmed because confirmation date is in the future
DateBeforeFreezeOrder can't be confirmed because confirmation date is prior to the freeze date
OrderNotConfirmedOrder already unconfirmed so can't be unconfirmed again
OrderCanceledOrder can't be unconfirmed because it's canceled
UnallocatedOrder can't be split because it's tottally unallocated
FullyAllocatedOrder can't be split because it's fully allocated
QueryParameterURI query parameters wrong; see associated Parameters array for which ones
RequiredRequired query parameter missing
NotParsableQuery parameter bad data
DoesNotExistQuery parameter refers to a non-existing record

This documentation is subject to change, and is updated often and without warning. The models documented may or may not be available to users now or in the future. Use this documentation at your own risk.
Contact api@3plcentral.com with any questions about this documentation.