API - Search Prices - Improvements

- Use config variables for API responses.
This commit is contained in:
2025-10-16 19:44:51 +02:00
parent 7673521708
commit 77f8e9ec31
5 changed files with 266 additions and 47 deletions
+2
View File
@@ -11,6 +11,7 @@ class ApiErrorMessage
const TYPE_LOGICAL_ERROR = 'logical_error';
const TYPE_SERVER_ERROR = 'server_error';
const TYPE_INVALID_DATE = 'invalid_date';
const TYPE_API_LIMIT = 'api_limit';
private static $titles = array(
self::TYPE_VALIDATION_ERROR => 'There was a validation error',
@@ -18,6 +19,7 @@ class ApiErrorMessage
self::TYPE_LOGICAL_ERROR => 'Invalid request due to a logic error',
self::TYPE_SERVER_ERROR => 'Error on server side',
self::TYPE_INVALID_DATE => 'Invalid date on request',
self::TYPE_API_LIMIT => 'Reached API Limit'
);
private int $statusCode;