mapFromRawStorageData() should check for well-formed values before creating ExternalEntityTransformRawDataEvent

Created on 18 June 2024, 6 months ago

Problem/Motivation

If an endpoint is badly configured and returns data that's not in the right format, the storage crashes:

> TypeError: Drupal\external_entities\Event\ExternalEntityTransformRawDataEvent::__construct(): Argument #2 ($raw_data) must be of type array, string given, called in /var/www/html/repos/external_entities/src/ExternalEntityStorage.php on line 320

It would be good to check $raw_data and throw a more meaningful exception.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024