API Error Messages
Here is a list of 10 typical error messages that can occur with API interfaces, along with their meanings and possible solutions:
Error 400 - Bad Request
Meaning: The client's request was invalid or erroneous. This can be caused by missing parameters, incorrect format, or invalid values.
Solution: Check the request for correct syntax and ensure that all required parameters are included.
Possible Causes:
Querying multiple components and listing in one API call: Query multiple components in one API call
Querying data over multiple epochs: Epochs and CrossEpochs
Missing time interval for the data query: Request values for day, month and year
Error 401 - Unauthorized
Meaning: The client did not send valid authentication data or is not authorized to access the requested resource.
Solution: Ensure that the API key or token is valid and sent correctly. The generated token is only valid for 5 minutes. If you receive a 401 error, renew your token via the appropriate call in your Postman Collection.
Error 403 - Forbidden
Meaning: The server received the request, but the client does not have permission to access the requested resource.
Solution: Check the access rights and ensure that the user or system has the necessary permissions. Check the API calls that are available in your package.
Links to package description:
Error 404 - Not Found
Meaning: The requested resource was not found on the server. This could be caused by an incorrect URL or a non-existent resource.
Solution: Check the URL and ensure that the resource exists.
Check if the portal name in the URL is correct. Please use only your portal name. The suffix “.enerest.world” is not needed in this case.
Check if the call you are making is included in the packages.
Links to package description:
Error 405 - Method Not Allowed
Meaning: The HTTP method (e.g., GET, POST, PUT, DELETE) used in the request is not supported for the requested resource.
Solution: Check which methods are allowed for the resource and use the correct method. Ensure that the method is set to GET. In most cases of our quota API, POST, PUT, and DELETE calls are not allowed.
Error 408 - Request Timeout
Meaning: The server waited too long for a request and therefore aborted it.
Solution: Check the network connection and try to repeat the request at a later time.
Error 429 - Too Many Requests
Meaning: The client has sent too many requests in a short time and has therefore been temporarily blocked (Rate Limiting).
Solution: Reduce the frequency of requests and try to query multiple data through one call if possible.
Querying multiple components and listing in one API call: Query multiple components in one API call
Error 500 - Internal Server Error
Meaning: The server encountered an unexpected error that prevented it from processing the request. This may mean, for example, that the server took too long to respond and therefore could not execute the request.
Solution: Try again later. If the error persists, check our help page with the current status of our systems: Portal Status
Error 502 - Bad Gateway
Meaning: The server received an invalid response from another server to which it forwards requests.
Solution: This is a temporary problem. Try again later. If the error persists, check our help page with the current status of our systems: Portal Status
Error 503 - Service Unavailable
Meaning: The server is currently unavailable, usually due to maintenance or overload.
Solution: Wait a while and try again later. If the error persists, check our help page with the current status of our systems: Portal Status
This list covers the most common API errors that developers and users of API services may encounter. It is important to provide users with clear guidance on how to resolve these issues to avoid frustration.