{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Error handling","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"error-handling","__idx":0},"children":["Error handling"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Spotnana uses the following standard HTTP response codes to indicate the status of an API request:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2xx"]}," Successful   – The request was successfully received, understood, and accepted."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4xx"]}," Client error – The request contains bad syntax or invalid parameter."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5xx"]}," Server error – The server failed to fulfil a request."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sample-error-message","__idx":1},"children":["Sample error message"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apart from the standard HTTP error codes, the error response contains a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorMessages"]}," > ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["errorCode"]}," field that"," ","gives you additional context about the error."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Here are some sample API error responses:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sample 1: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP/1.1 400 Bad Request"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"debugIdentifier\": \"https://debug.services.spotnana.com/file-search-results/5404d15aa99f5e2d4?q=debugid\",\n    \"errorMessages\": [\n        {\n            \"errorCode\": \"INVALID_EMAIL_DOMAIN\"\n        }\n    ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Sample 2: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTTP/1.1 401 Unauthenticated"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"debugIdentifier\": \"https://debug.services.spotnana.com/file-search-results/null_a1fc321663723ce3?q=debugid\",\n  \"errorMessages\": [\n    {\n      \"errorCode\": \"USER_NOT_AUTHENTICATED\"\n    }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"known-error-codes","__idx":2},"children":["Known error codes"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status Code"},"children":["Status Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"34%","data-label":"Error Code"},"children":["Error Code "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Context"},"children":["Context"]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Description"},"children":["Description "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Resolution"},"children":["Resolution "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TOO_MANY_REQUESTS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/spotnana/authentication"},"children":["Generating an authentication token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rate limit for the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/authapi/authentication/fetchoauth2token"},"children":["auth endpoint"]}," has been exceeded. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Note:"]}," Applies to the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/v2/auth/oauth2-token"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/get-auth-token"]}," endpoints."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reuse existing tokens in subsequent API calls until they expire."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["INVALID_USER_IDS_QUERY_PARAMS"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/openapi/usersapi/users/queryuser"},"children":["Searching for a user"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tmcId"]}," provided in the query params are not valid UUIDs."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["companyId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tmcId"]}," are valid UUIDs."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["API_VALIDATION_FAILED"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any API"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The request body does not match the expected schema."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the request body against the expected schema and correct any mismatches."]}]}]}]}]}]},"headings":[{"value":"Error handling","id":"error-handling","depth":1},{"value":"Sample error message","id":"sample-error-message","depth":2},{"value":"Known error codes","id":"known-error-codes","depth":2}],"frontmatter":{"seo":{"title":"Error handling"}},"lastModified":"2026-02-25T08:57:52.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/spotnana/error_handling","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}