llms_rest_server_error( string $message = '' )
Return a WP_Error for a 500 Internal Server Error.
Parameters Parameters
- $message
-
(string) (Optional) Custom error message. When none provided a predefined message is used.
Default value: ''
Return Return
(WP_Error)
Source Source
File: libraries/lifterlms-rest/includes/server/llms-rest-server-functions.php
function llms_rest_server_error( $message = '' ) { $message = ! $message ? __( 'Internal Server Error.', 'lifterlms' ) : $message; return new WP_Error( 'llms_rest_server_error', $message, array( 'status' => WP_Http::INTERNAL_SERVER_ERROR ) ); // 500. }
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. |