GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Dancer::RPCPlugin::ErrorResponse(3) User Contributed Perl Documentation Dancer::RPCPlugin::ErrorResponse(3)

Dancer::RPCPlugin::ErrorResponse - Interface to pass error-responses without knowlage of the protocol

    use Dancer::RPCPlugin::ErrorResponse;

    sub handle_rpc_call {
        ...
        return error_response(
            error_code => 42,
            error_message => 'That went belly-up',
        );
    }

Factory function that retuns an instantiated Dancer::RPCPlugin::ErrorResponse.

Parameters

error_code => $error_code [required]
error_message => $error_message [required]
error_data => $error_data [optional]

Responses

An instance or an exception from Params::ValidationCompiler.

    register_error_responses(
        xmlrpc => {
            default => 200,
        }
    )

    register_error_responses(
        restish => {
            default => 500,
            -32700 => 400,
            -32701 => 400,
            -32702 => 400,
            -32600 => 400,
            ...
        }
    );

Parameters
error_code => $error_code [required]
error_message => $error_message [required]
error_data => $error_data [optional]

Responses

An instance or an exception from Params::ValidationCompiler.

Method that returns the HTTP status code from the map provided in "Dancer::RPCPlugin::ErrorResponse::register_error_responses()"

Getter for the "error_code" attribute.

Getter for the "error_message" attribute.

Getter for the "error_data" attribute.

Returns a data-structure for the use in the "error" field of a jsonrpc response.

Returns a data-structure like the "error-field" in a JSONRPC2 error response.

Returns a data-structure for the use as a "fault" response in XMLRPC.

(c) MMXVII - Abe Timmerman <abetim@cpan.org>
2020-02-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.