Log errors instead of exposing them via message in the frontend

Created on 1 December 2023, 10 months ago
Updated 8 March 2024, 7 months ago

Problem/Motivation

Some errors when calling an API or parsing the result of a JSON are, in some configurations, exposed in the frontend, when they should be logged as they may contain information that the developer/site builders don't want to be leaked.

Steps to reproduce

Install views_json_source, use views_json_source plugin, set a invalid json file, or an inacessible API.

Proposed resolution

Remove static calls to \Drupal::messenger() to la logger instance and use Dependency injection instead.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇵🇹Portugal joao.ramos.costa

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