When the API returns a bad request response, it is not properly handled by the library. The API returns a JSON with key "Message" example: ``` {"Message":"Tag handling parsing failed, please check input.\n\n'undefined entity: line 2, column 17' (at Line: 2, Column: 17)"} ``` The library assumes a key "message" (lowercase). See Translator.php method checkStatusCode ```php $message = ''; try { $json = json_decode($content, true, 512, \JSON_THROW_ON_ERROR); if (isset($json['message'])) { $message .= ", message: {$json['message']}"; } if (isset($json['detail'])) { $message .= ", detail: {$json['detail']}"; } } catch (\Exception $e) { // JSON parsing errors are ignored, and we fall back to the raw response $message = ", $content"; } ``` Thus the details of the error are lost, and this is very hard to debug in our projects.
Activity
daniel-jones-dev commentedon Dec 15, 2025
Hi @rauwebieten, thanks a lot for this report, I'm going to fix it immediately.
daniel-jones-dev commentedon Dec 16, 2025
This is now fixed in our API; it should return responses with "message" correctly.