Api_Can_Send_Error
Provides an `send_error` method for API responses.
Tags
Table of Contents
- send_error() : WP_REST_Response
- Send an error response.
Methods
send_error()
Send an error response.
protected
send_error(string $message[, int $code = 400 ]) : WP_REST_Response
Parameters
- $message : string
-
The error message.
- $code : int = 400
-
The error code.