API Exceptions.
The HTTP status code should be the first place to look for what went right or wrong.
Status | Description |
---|---|
200 | Success. See payload for response. |
201 | Success. Resource created. See payload for response. |
202 | Accepted. Further processing is taking place asynchronously. Payload will typically contain an async status link for polling completion status. |
204 | Success. No response payload -- intentionally left blank. |
400 | Bad request. See payload for more information. If the content-type is application/json, it will be one of the exceptions listed below. |
401 | Unauthorized. Missing Authorization header with proper bearer token. |
403 | Forbidden. 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. |
404 | Not found. Resource doesn't exist. |
412 | Precondition failed. The If-Match header specified doesn't match the current state of the resource. |
428 | Precondition required. If-Match header required. |
500 | Server error. See the payload for further information. It will be plain text, NOT one of exception types listed below. |
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" }
Name | Type | Description |
---|---|---|
Generic.Models.Exceptions.AuthorizationException | WmsExceptionBase-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.ListException | container 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 |
EntryInfo | string | optional info about the entry in the source list, such as id, sku, ref#, etc. |
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 |
InnerException | System.Exception | |
Generic.Models.Exceptions.ModelValidationException | WmsExceptionBase-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.OperationException | WmsExceptionBase-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.QueryParameterException | WmsExceptionBase-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:
Type | ErrorCode | Description |
---|---|---|
ModelValidation | Model properties in request payload wrong; see associated Properties array for which properties; results in Status 400 | |
Required | Required property missing, such as an order ReferenceNum. | |
DoesNotExist | Property value refers to a non-existing record, such as a specified Sku doesn't exist. | |
Duplicate | Property, if added to the database, would result in a disallowed duplicate, such as a duplicate order ReferenceNum | |
Incompatible | Two or more properties have conflicting values, such as location to be contained in an audit is not in the audit's facility. | |
ValueNotSupported | Property value outside the domain of allowed values, such as a negative number not allowed. | |
OperationException | Operation requested not possible; results in Status 403 | |
InUse | Record can't be deleted because it contains references | |
WrongCustomerInBatch | Order can't be added to batch for different customer | |
MixedFacilitiesInBatch | Order can't be added to batch resulting in multiple facilities | |
OrderConfirmed | Order can't be completed or split because it's confirmed | |
AlreadyCompleted | Order already completed so can't be completed again | |
NotFullyAllocated | Order can't be confirmed because it's not fully allocated | |
DateInFuture | Order can't be confirmed because confirmation date is in the future | |
DateBeforeFreeze | Order can't be confirmed because confirmation date is prior to the freeze date | |
OrderNotConfirmed | Order already unconfirmed so can't be unconfirmed again | |
OrderCanceled | Order can't be unconfirmed because it's canceled | |
Unallocated | Order can't be split because it's tottally unallocated | |
FullyAllocated | Order can't be split because it's fully allocated | |
QueryParameter | URI query parameters wrong; see associated Parameters array for which ones | |
Required | Required query parameter missing | |
NotParsable | Query parameter bad data | |
DoesNotExist | Query 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.