llms_rest_bad_request_error( string $message = '' )
Return a WP_Error with proper code, message and status for invalid or malformed request syntax.
Parameters Parameters
- $message
-
(string) (Optional) The custom error message. When no custom message is provided a predefined message will be used.
Default value: ''
Return Return
(WP_Error)
Source Source
File: libraries/lifterlms-rest/includes/server/llms-rest-server-functions.php
function llms_rest_bad_request_error( $message = '' ) { $message = ! $message ? __( 'Invalid or malformed request syntax.', 'lifterlms' ) : $message; return new WP_Error( 'llms_rest_bad_request', $message, array( 'status' => WP_Http::BAD_REQUEST ) ); // 400. }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.18 | Use WP_Http constant for the error status. |
1.0.0-beta.1 | Introduced. |