WordPress / WordPress/two-factor

Error Reporting from Saving methods

Open
#244 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
825
Forks
187
Avg merge
2d 11h
Merged PRs (30d)
17

Description

As the save methods are currently architected, errors are not returned and are therefore unusable outside of the normal save method. It would be useful to have a way of retrieving these errors for use outside of this default setup.

For example, when working on the force-2fa functionality I have a standalone takeover view that uses AJAX to submit the settings and re-load to a normal view once submitted. the problem is that I have no useful information coming back from the save methods so I have to re-load the page whether saving was successful or not which is very confusing from a user's perspective.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the save methods and the standalone AJAX takeover view described in the issue. Determine how save failures and successes can be exposed to callers, then verify that the AJAX flow can distinguish them without reloading blindly.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authentication
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.