Request

Response

    Error Handling

    This section provides essential information on handling exceptions and errors in the Manufacturing Data Model API, including HTTP status and OAuth errors.

    Error types

    The Manufacturing Data Model APIs can return three types of errors and exceptions: HTTP statuses, Manufacturing Data Model API exceptions and errors, and OAuth errors. The error payload response format depends on the service that generated the error.

    HTTP status response codes

    APS services use the standard HTTP status response codes in the response header to convey the successful or failure of a request. A response in the 2xx error code range indicates successful, while a response in the 4xx range signifies a failure in request handling, typically due to an invalid parameter within the request. A response in the 5xx range typically indicates an internal server error.

    For list of HTTP status response codes and their descriptions, see here.

    Manufacturing Data Model API exceptions and errors

    This section provides the error conventions and the list of errors returned by the Manufacturing Data Model API service. The service that generated the error determines the format of the error payload response.

    Error conventions for the Manufacturing Data Model API

    The following table shows the convention of the MDM API error object:

    Expand all
    message
    string
    Description of the error
    locations
    string
    Location of the object
    path
    string
    This is a list of fields indicating the location of the error.
    extensions
    string
    Extensions mapped to the object.
    correlation_id
    string
    Correlation ID mapped to the object.
    code
    string
    Error code mapped to the object.

    Example of an error response for the MDM API

    This code snippet illustrates an error response and its components for the MDM API exceptions and errors. It can help in understanding and resolving errors.

    Using Query.folder(projectId: ID!, folderId: ID!) with folderId argument not corresponding to a folder.
    
    {
      "errors": [
        {
          "message": "folderId must correspond to a folder.",
          "path": [
            "folder"
          ],
          "extensions": {
            "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
            "code": "BAD_REQUEST"
          }
        }
      ],
      "data": {
          "folder": null
      }
    }
    
    Show More

    List of Manufacturing Data Model API Exceptions and Errors

    The following list includes error types and request codes, along with their descriptions and example code snippet.

    • BAD_REQUEST

      • Error Code: BAD_REQUEST
      • Error Description:

        • The client provided a bad GraphQL request.
        • The server rejected the request due to a client error.
      • Example:

        When using Query.folder(projectId: ID!,folderId: ID!) where the folderId argument doesn’t point to a folder that exists.

        # Using Query.folder(projectId: ID!, folderId: ID!) with folderId argument not corresponding to a folder.
        
        {
          "errors": [
            {
              "message": "folderId must correspond to a folder.",
              "path": [
                "folder"
              ],
              "extensions": {
                "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
                "code": "BAD_REQUEST"
              }
            }
          ],
          "data": {
              "folder": null
          }
        }
        
        Show More
    • CONFLICT

      • Error Code: CONFLICT
      • Error Description:

        • The GraphQL request can’t be processed because of a conflict with the current state of the target resource.
        • The resource may not be in the expected state (for example, locked) or the processing of the request may result in a conflicting state.
        • The client can usually retry later.
      • Example:

        # This error occurs when a request cannot be completed due to a conflict with the current state of the target resource.
        
            {
             "errors": [
                  {
                  "message": "Conflict on resource. Please try again later or change parameters.",
                  "path": [
                      "folder"
                  ],
                  "extensions": {
                      "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
                      "code": "CONFLICT"
                  }
                  }
              ],
              "data": {
                  "folder": null
              }
            }
        
        Show More

    • FORBIDDEN

      • Error Code: FORBIDDEN
      • Error Description:

        • The user does not have access to the requested resources.
      • Example:

        # This error occurs when the user or client attempts to query a folder without sufficient access rights:
        
        {
          "errors": [{
            "message": "You do not have access to  requested resources.",
            "path": [
              "folder"
            ],
            "extensions": {
              "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
              "code": "FORBIDDEN"
            }
          }],
          "data": {
              "folder": null
          }
        }
        
        Show More

    • GATEWAY_TIMEOUT

      • Error Code: GATEWAY_TIMEOUT
      • Error Description:

        • The service could not process the request in the allowed time.
      • Example:

        # This error occurs when the service is processing a complex or resource-intensive query and fails to complete within the allocated time frame:
        
        {
          "errors": [{
            "message": "The service took too long to respond. Please try again later.",
            "path": [
              "folders"
            ],
            "extensions": {
              "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
              "code": "GATEWAY_TIMEOUT"
            }
          }],
          "data": {
              "folders": null
            }
          }
        }
        
        Show More
    • INTERNAL_SERVER_ERROR

      • Error Code: INTERNAL_SERVER_ERROR
      • Error Description:

        • This error message signifies an unhandled error that may be related to any of the possible errors, indicating a problem either with the API or with downstream services.
        • You can retry sending the request later and/or reach out to us with their correlation ID.
      • Example:

        # This error occurs when the server encounters an unexpected condition that prevents it from fulfilling the request:
        
        {
          "errors": [{
            "message": "Unknown Internal Server Error. You may contact support with your correlation-id.",
            "path": [
              "folders"
            ],
            "extensions": {
              "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
              "code": "INTERNAL_SERVER_ERROR"
            }
          }],
          "data": {
              "folders": null
            }
          }
        }
        
        Show More
    • NOT_FOUND

      • Error Code: NOT_FOUND
      • Error Description:

        • The requested resource could not be found, either because it does not exist or has been deleted.
      • Example:

        #  This error occurs when querying a folder that does not exist:
        
          {
            "errors": [
              {
                "message": "Requested resource not found.",
                "path": [
                    "folder"
                ],
                "extensions": {
                    "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
                    "code": "NOT_FOUND"
                }
              }
            ],
            "data": {
              "folder": null
              }
            }
          }
        
        Show More
    • TOO_MANY_REQUESTS

      • Error Code: TOO_MANY_REQUESTS
      • Error Description: - The request is rejected due to reaching its allowed quota. You may wait for a few seconds and then attempt again.
      • Example:

        # This error occurs when querying a folder with client requests that exceed the allocated quota:
        
          {
            "errors": [
                {
                "message": "Too many requests on downstream service. You may have reached your allowed requests quota. You may try again later.",
                "path": [
                    "folder"
                ],
                "extensions": {
                    "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
                    "code": "TOO_MANY_REQUESTS"
                }
                }
            ],
            "data": {
                "folder": null
                }
            }
          }
        
        Show More
    • UNAUTHORIZED

      • Error Code: UNAUTHORIZED
      • Error Description:

        • The server could not authenticate the user or client.
        • Most likely, you provided a two-legged OAuth token when it should have been a three-legged OAuth token.
      • Example:

        # This error occurs when a two-legged OAuth token is used instead of a three-legged OAuth token (excluding project admin features):
        
        {
          "errors": [
              {
              "message": "Your authorization failed. Please verify Bearer Token.",
              "path": [
                  "model"
              ],
              "extensions": {
                  "correlation_id": "ba3d398e-ff32-44a2-9afa-45220119c501",
                  "code": "UNAUTHORIZED"
              }
              }
          ],
          "data": {
              "model": null
              }
          }
        }
        
        Show More

    OAuth errors

    OAuth, specifically OAuth2, is the open standard used across APS for token-based authentication and authorization.

    For OAuth related errors, see here.

     
    ______
    icon-svg-close-thick

    Cookie preferences

    Your privacy is important to us and so is an optimal experience. To help us customize information and build applications, we collect data about your use of this site.

    May we collect and use your data?

    Learn more about the Third Party Services we use and our Privacy Statement.

    Strictly necessary – required for our site to work and to provide services to you

    These cookies allow us to record your preferences or login information, respond to your requests or fulfill items in your shopping cart.

    Improve your experience – allows us to show you what is relevant to you

    These cookies enable us to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we use to deliver information and experiences tailored to you. If you do not allow these cookies, some or all of these services may not be available for you.

    Customize your advertising – permits us to offer targeted advertising to you

    These cookies collect data about you based on your activities and interests in order to show you relevant ads and to track effectiveness. By collecting this data, the ads you see will be more tailored to your interests. If you do not allow these cookies, you will experience less targeted advertising.

    icon-svg-close-thick

    THIRD PARTY SERVICES

    Learn more about the Third-Party Services we use in each category, and how we use the data we collect from you online.

    icon-svg-hide-thick

    icon-svg-show-thick

    Strictly necessary – required for our site to work and to provide services to you

    Qualtrics
    W
    Akamai mPulse
    W
    Digital River
    W
    Dynatrace
    W
    Khoros
    W
    Launch Darkly
    W
    New Relic
    W
    Salesforce Live Agent
    W
    Wistia
    W
    Tealium
    W
    Upsellit
    W
    CJ Affiliates
    W
    Commission Factory
    W
    Google Analytics (Strictly Necessary)
    W
    Typepad Stats
    W
    Geo Targetly
    W
    SpeedCurve
    W
    Qualified
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Improve your experience – allows us to show you what is relevant to you

    Google Optimize
    W
    ClickTale
    W
    OneSignal
    W
    Optimizely
    W
    Amplitude
    W
    Snowplow
    W
    UserVoice
    W
    Clearbit
    #
    YouTube
    #

    icon-svg-hide-thick

    icon-svg-show-thick

    Customize your advertising – permits us to offer targeted advertising to you

    Adobe Analytics
    W
    Google Analytics (Web Analytics)
    W
    AdWords
    W
    Marketo
    W
    Doubleclick
    W
    HubSpot
    W
    Twitter
    W
    Facebook
    W
    LinkedIn
    W
    Yahoo! Japan
    W
    Naver
    W
    Quantcast
    W
    Call Tracking
    W
    Wunderkind
    W
    ADC Media
    W
    AgrantSEM
    W
    Bidtellect
    W
    Bing
    W
    G2Crowd
    W
    NMPI Display
    W
    VK
    W
    Adobe Target
    W
    Google Analytics (Advertising)
    W
    Trendkite
    W
    Hotjar
    W
    6 Sense
    W
    Terminus
    W
    StackAdapt
    W
    The Trade Desk
    W
    RollWorks
    W

    Are you sure you want a less customized experience?

    We can access your data only if you select "yes" for the categories on the previous screen. This lets us tailor our marketing so that it's more relevant for you. You can change your settings at any time by visiting our privacy statement

    Your experience. Your choice.

    We care about your privacy. The data we collect helps us understand how you use our products, what information you might be interested in, and what we can improve to make your engagement with Autodesk more rewarding.

    May we collect and use your data to tailor your experience?

    Explore the benefits of a customized experience by managing your privacy settings for this site or visit our Privacy Statement to learn more about your options.