article Troubleshooting
Learn how to debug and handle errors when using GoFreight APIs
Our API returns standard HTTP status codes. If there’s an error, an error status code along with a descriptive message will be returned. Below are some common error codes and suggested actions:
400
: Bad Request
Action: Check the format and values of the parameters you are sending. Ensure they meet the required specifications.
If invalid parameters is given, for example, the page
parameter is not a digit string:
curl --request GET \
--url 'https://api.core.gofreight.co/api/v1/trade-partners/?page=10a&limit=100' \
--header 'Accept: application/json' \
--header 'X-GATEWAY-TOKEN: {{your-api-key}}'
An error response might look like this
("field: _ViewParamsSpec.page, reason: '10a' is not a digit str",)
401
: Unauthorized
Action: Make sure your credentials are correct and confirm that you have the required permissions to access the resource.
404
: Not Found
Action: Make sure the requested resource(s) exist in the system. Check the endpoint URL and resource identifiers carefully.
500
: Internal Server Error
Action: This error usually indicates an issue on the server side. You may want to try the request again later or contact GoFreight support if the issue persists.