Trouble Shooting

EDocGen API requests can fail for a variety of reasons, and this guide is intended to help you identify and address API errors.

An unsuccessful EDocGen request will always return the following information in the response body:

  • Code: the standard http response code, e.g, Forbidden, Not Found, etc.

  • Message:

    • Lang: the language culture name of this message

    • Value: an error message explaining why the request failed

EDocGen API HTTP Response Codes

  • 200 OK This response indicates that your request was successfully executed, and the response content should contain the object you wanted to retrieve, create, or modify. If the response is successful, but the content is not what you expected, please contact us.

  • 400 Bad Request This response indicates that there was a problem with the way the request was constructed. The error message property is particularly helpful in this case as it will often indicate which specific parameter or header is missing or misconstructed. Most error messages for Bad Request will be in the following format: Invalid Argument: Object.Property

  • 401 Unauthorized This response indicates that you did not provide a valid authentication method. Refer to the Authentication page to learn how to authenticate against the API. The most common reason behind a 401 response is providing an invalid or expired Bearer token. A 401 response is a good indication that it is time to generate a new token.

  • 404 Not Found This response indicates that the resource you attempted to retrieve does not exist. If an invalid api endpoint is requested, a Not Found response will be sent as well.

  • 500 Internal Server Error This response indicates that an unexpected error occurred while processing the request. Internal Server Errors should happen very scarcely, and can usually be attributed to brief system hiccups. Internal Server Errors are often out of your hands as a developer, with one exception: if the error message returned looks something like this, “Object reference not set to an instance of an object,” it usually means that the request’s JSON payload is misconstructed or that the Content-type header is not set to application/json. Please contact us if you get a persistent Internal Server error and the error message is not helpful.