Api_Provide_Error_Response
Provides a `send_error_response` method that can be used to communicate error messages via the react app.
Tags
Table of Contents
- send_error_response() : WP_REST_Response
- Send an error response via `WP_Rest_Response`.
Methods
send_error_response()
Send an error response via `WP_Rest_Response`.
public
send_error_response(string $message) : WP_REST_Response
Parameters
- $message : string
-
the message to display as an error.