Closed SystemKeeper closed 1 month ago
When we receive a 422 - Unprocessable entity error (so the remote could not be reached), ocs.data is an empty array instead of nil, which is why we crash here. So we need to make sure we got a dictionary, before accessing any keys.
422 - Unprocessable entity
ocs.data
nil
Ref https://github.com/nextcloud/spreed/blob/df923967fa31f9abe1c674f43b2ed88f3064415b/lib/Middleware/InjectionMiddleware.php#L411-L417
When we receive a
422 - Unprocessable entity
error (so the remote could not be reached),ocs.data
is an empty array instead ofnil
, which is why we crash here. So we need to make sure we got a dictionary, before accessing any keys.Ref https://github.com/nextcloud/spreed/blob/df923967fa31f9abe1c674f43b2ed88f3064415b/lib/Middleware/InjectionMiddleware.php#L411-L417