Skip to content

TLDMetaData serialization throws exception breaking TLD info API #80

Description

@koenhendriks

It seems that the fields added in 6d15e26 are not always present in the json, causing an exception when trying to call fromArray() on TLDMetaData.

All other keys are checked and set to null if missing, but not the premiumSupport, wdrpNotifications, and errpNotifications

{
    "exception.message":"Undefined array key \"wdrpNotifications\"",
    "exception.previous":"",
    "exception.thrown_at":"/srv/www/vendor/realtimeregister/realtimeregister-php/src/Domain/TLDMetaData.php line 249",
    "exception.trace":"#0 /srv/www/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(258): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->handleError()\n#1 /srv/www/vendor/realtimeregister/realtimeregister-php/src/Domain/TLDMetaData.php(249): Illuminate\\Foundation\\Bootstrap\\HandleExceptions->{closure:Illuminate\\Foundation\\Bootstrap\\HandleExceptions::forwardsTo():257}()\n#2 /srv/www/vendor/realtimeregister/realtimeregister-php/src/Domain/TLDInfo.php(29): RealtimeRegister\\Domain\\TLDMetaData::fromArray()\n#3 /srv/www/vendor/realtimeregister/realtimeregister-php/src/Api/TLDsApi.php(13): RealtimeRegister\\Domain\\TLDInfo::fromArray()"
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions