Rest resource response throws exception when sending sms inside the resouce

Created on 26 August 2016, over 8 years ago
Updated 1 March 2025, about 1 month ago

Problem

When creating a rest resource that sends an sms using the module, the following exception appears when receiving a response from the resource:

A fatal error occurred: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\\rest\\ResourceResponse.

Solution

Similarly to how #2630808: Response::getResponse() does not collect cacheability metadata from Url object solved it, the Url generated should collect bubbleable metadata in SmsMessageProcessor::deliveryReportUrl().

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Core Framework

Created by

🇮🇱Israel nyariv

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024