This document outlines the error codes and their corresponding meanings used in the Version Bumping Service. The service provides endpoints for incrementing semantic versions and retrieving the current application version. Understanding these error codes is crucial for proper error handling and debugging.
- ERR_SUCCESSFUL (0)
- Description: The request was processed successfully without any issues.
- Action: No action required.
-
ERR_BYTESUNREADABLE (1)
- Description: The request body could not be read or was in an invalid format.
- Action: Check the request payload for proper JSON formatting and completeness.
-
ERR_REQDATAEMPTY (2)
- Description: The request data is empty or missing required fields.
- Action: Ensure that the request body contains all necessary fields (
version
,currentVersion
,class
).
-
ERR_INTERNALSERVERERROR (5)
- Description: An internal server error occurred, typically related to version parsing or bumping logic.
- Action: Review the request for valid version strings and classes (major, minor, patch). Check server logs for more detailed error information.
- No specific error codes defined for this endpoint.
- Note: Errors encountered in the
/version
endpoint are generally related to internal server issues or misconfigurations.
- Note: Errors encountered in the
- Client-Side: Ensure that the request payload is correctly structured and that all required fields are provided.
- Server-Side: Proper logging should be implemented to capture detailed error information, aiding in debugging and issue resolution.
- Testing: Thoroughly test all endpoints with various scenarios, including edge cases, to ensure robust error handling.
- Documentation: Maintain clear documentation for all error codes and update it whenever new codes are introduced or existing codes are modified.