Make WordPress Core


Ignore:
Timestamp:
02/08/2025 03:58:11 PM (12 months ago)
Author:
audrasjb
Message:

General: Error messages improvements in /wp-includes files.

This changeset improves a bunch of error messages, notably replacing the good old cryptic "Something went wrong" message with more helpful information.

Props peterwilsoncc, netweb, karmatosed, JoshuaWold, mrtortai, audrasjb, sukhendu2002, joedolson.
Fixes #43622.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r59754 r59790  
    40324032
    40334033        if ( ! $comment_id ) {
    4034             return new IXR_Error( 403, __( 'Something went wrong.' ) );
     4034            return new IXR_Error( 403, __( 'An error occurred while processing your comment. Please ensure all fields are filled correctly and try again.' ) );
    40354035        }
    40364036
     
    50525052
    50535053        if ( ! $posts_list ) {
    5054             $this->error = new IXR_Error( 500, __( 'Either there are no posts, or something went wrong.' ) );
     5054            $this->error = new IXR_Error( 500, __( 'No posts found or an error occurred while retrieving posts.' ) );
    50555055            return $this->error;
    50565056        }
     
    65856585
    65866586        if ( ! $posts_list ) {
    6587             $this->error = new IXR_Error( 500, __( 'Either there are no posts, or something went wrong.' ) );
     6587            $this->error = new IXR_Error( 500, __( 'No posts found or an error occurred while retrieving posts.' ) );
    65886588            return $this->error;
    65896589        }
Note: See TracChangeset for help on using the changeset viewer.