Ucommerce
  • Ucommerce Next Gen
    • Getting Started
      • Prerequisites
      • Licensing
      • Ucommerce Templates
      • Headless Template
      • MVC Template
    • Headless
      • Postman Collection
      • Headless API Authentication
        • Token endpoint - Authorization Header
        • Authorization Scopes
        • Refreshing the Access Token
      • Reference
        • Cart
        • Cart / Order Line Items
        • Shipment
        • Billing
        • Promotion Codes
        • Price Groups
        • Payment Methods
        • Countries
        • Shipping Methods
        • Catalogs
        • Cart Custom Properties
        • Line Item Custom Properties
        • Orders
        • Views for Cart modifying operations
      • Custom Headless APIs
      • Error Handling
      • Pagination
      • Deprecation
    • Backoffice Authentication
      • Microsoft Entra ID Example
      • Auth0 Authentication Example
    • Definitions
      • What is a Definition
    • Search and indexing
      • Configuration
      • Indexing
        • Index Definitions
        • Facets
        • Indexing Prices
        • Suggestions
        • Custom Data
      • Searching
    • Payment Providers
      • Stripe Provider Integration
      • Implementing a custom payment provider
    • Data Import
    • Miscellaneous
      • Media
      • Price Group Inheritance
      • Price Group Criteria
      • Soft Deletion Of Entities
      • Logging
      • OpenTelemetry
    • Extensions
      • Extending Pipelines
        • Order Processing Pipelines
        • Checkout Pipelines
      • Changing Service Behavior
        • Images
        • Content
      • Custom Headless APIs
      • Extend the Backoffice
        • Custom UI Components
      • Custom Editor UI
      • Custom Promotion Criteria
      • Custom Price Group Criteria
    • How-To
      • Migrate from Classic
        • Common database issues
      • Entities from code
        • Bootstrapping data on startup
        • Product Definitions & Fields
      • Discover pipelines and their tasks
      • Executing a pipeline
    • Integrations
      • Umbraco Media Delivery API
      • App Slices
        • Product Picker
  • Release Notes
  • Contact Us
Powered by GitBook
On this page

Was this helpful?

  1. Ucommerce Next Gen
  2. Headless

Error Handling

All successful requests to the API return an HTTP 200 or 201. In case of errors, the API returns a JSON response containing the error code and details about the error:

{
  "errors": [
    {
      "error-description": "Price Group cannot be null or empty",
      "error": "Price group must contain an id"
    }
  ]
}

The format of the error description varies between error codes.

The following combinations of error codes are returned from the API:

HTTP
Description
Handling

400

Invalid input provided. See details.

Check that the input sent is correct.

401

Incorrect Client ID and/or Client Secret in HTTP header or Access Token invalid.

403

The authentication token does not have access to this endpoint.

404

A resource with the supplied ID was not found in the current store.

Try with an existing resource.

500

Unknown error.

Not retryable.

504

Gateway time out.

Call can be retried.

PreviousCustom Headless APIsNextPagination

Last updated 1 year ago

Was this helpful?