-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When RDAP server returns a protocol error, such as:
{
"errorCode": 429,
"title": "Error in processing request",
"description": [
"Server is busy now, please try again later.",
"Too Many Requests"
],
"lang": "en"
}it results in
InvalidDataTypeException: Response is not valid json content
client fails to assert that due to
RDAP-Client/src/Response/Abstracts/AbstractResponse.php
Lines 77 to 80 in d1d4f8f
| if (!is_array($responseJson) || !is_string($responseJson['objectClassName']??null)) { | |
| throw new InvalidDataTypeException( | |
| 'Response is not valid json content' | |
| ); |
objectClassName is not in the response data.
Better to check for rdapConformance that always is in the response of any kind.
But actually best would be to throw a response exception with received code and description.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working