HTTP Error Response Codes in the BungalowNet API

4 min. readlast update: 12.06.2024

When using the BungalowNet API, you may encounter certain HTTP error response codes. These codes provide information about what went wrong with your request and how you can address the issue. Below is a detailed guide to help you understand and handle these response codes effectively.


Client-Side Errors (4xx)

Errors in the 4xx range indicate a problem with the client’s request. Review your request to ensure it complies with the API’s requirements.

400 Bad Request

Description:
The server cannot process your request due to a client-side error such as malformed JSON, invalid parameters, or incorrect syntax.

How to Fix:

  • Ensure your request body and parameters follow the API's expected format.
  • Validate data types and required fields.

401 Unauthorized

Description:
Authentication is required, but your request did not include valid credentials or an API key.

How to Fix:

  • Confirm that your API key is included in the request header.
  • Ensure the API key is active and has not expired.

403 Forbidden

Description:
You do not have the necessary permissions to access the requested resource.

How to Fix:

  • Check if your API key has the required access permissions.
  • Contact the IT department if you believe this is incorrect.

404 Not Found

Description:
The requested resource or endpoint does not exist on the server.

How to Fix:

  • Verify the endpoint URL is correct.
  • Refer to the API Documentation for the list of valid endpoints.

405 Method Not Allowed

Description:
The HTTP method used (e.g., GET, POST, DELETE) is not allowed for the resource.

How to Fix:

  • Check the documentation for allowed HTTP methods on the specific endpoint.

409 Conflict

Description:
Your request could not be completed due to a conflict with the current state of the resource. Commonly occurs when trying to create duplicate entries.

How to Fix:

  • Ensure you’re not submitting duplicate data (e.g., creating a resource that already exists).

422 Unprocessable Entity

Description:
The request was well-formed, but semantic issues prevent it from being processed. This is commonly used for validation errors.

How to Fix:

  • Review validation rules for the endpoint and adjust your request payload accordingly.
  • Look for detailed error messages in the response.

429 Too Many Requests

Description:
You have exceeded the rate limit of 100 requests per minute.

How to Fix:

  • Implement rate-limiting in your application to avoid sending excessive requests.
  • Retry after the time specified in the Retry-After header, if provided.

Server-Side Errors (5xx)

Errors in the 5xx range indicate an issue with the server or the API infrastructure.

500 Internal Server Error

Description:
The server encountered an unexpected error and could not process your request.

How to Fix:

  • Retry the request later.
  • Contact the IT department if the issue persists.

501 Not Implemented

Description:
The requested functionality is not supported by the server.

How to Fix:

  • Ensure the feature or operation you’re attempting is supported by the API.
  • Refer to the API documentation for available functionality.

502 Bad Gateway

Description:
The server, acting as a gateway or proxy, received an invalid response from an upstream server.

How to Fix:

  • Retry the request after a short delay.
  • Contact the IT department if the issue persists.

503 Service Unavailable

Description:
The server is temporarily overloaded or undergoing maintenance and cannot handle your request.

How to Fix:

  • Wait and retry your request later.
  • Contact the IT Department via the help center.

504 Gateway Timeout

Description:
The server, acting as a gateway or proxy, did not receive a timely response from an upstream server.

How to Fix:

  • Retry the request later.
  • Contact support if the problem persists over time.

General Tips for Handling Errors

  1. Check Response Details:
    Many error responses include additional information in the body to help you debug the issue.

  2. Logging:
    Enable logging in your application to capture error responses for troubleshooting.

  3. Retry Logic:
    Implement retry logic for transient errors, especially 5xx errors and 429 rate-limiting responses.

  4. Contact Support:
    For unresolved issues, reach out to the IT department with detailed logs, including timestamps and error codes, via our help center.


For more information, refer to the API documentation or contact support for assistance.

Was this article helpful?