Automattic / Automattic/WP-Job-Manager

Add geocoding debug logging

Open
#1,966 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
899
Forks
369
Avg merge
11h 37m
Merged PRs (30d)
12

Description

It seems that in the WP_Job_Manager_Geocode:: get_location_data() when there is an error, the method does return a `WP_Error` after throwing an Exception -- but from what I can find, that isn't actually used, caught or dealt with anywhere.

So what i'm thinking is maybe we can add a filter that a user can enable when they are having issues, that would essentially write to the `error_log` instead of just returning a `WP_Error` that is never dealt with.

Thoughts? I can submit a PR for this but wanted to start a discussion on it to see others thoughts

@jom

Contributor guide

Open the contributing guide

Research direction

Start by tracing WP_Job_Manager_Geocode::get_location_data() and how its WP_Error and Exception paths are handled. Review the proposed filter and error_log behavior, then clarify the expected opt-in logging scope and verify that geocoding errors are observable without changing normal error handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.