The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::OATH::Server::Lite::Error - Error class of Lite Server

SYNOPSIS

    use Net::OATH::Server::Lite::Error;

    # default error
    # HTTP/1.1 400 Bad Request
    # Content-Type: application/json;charset=UTF-8
    # Cache-Control: no-store
    # Pragma: no-cache
    #
    # {
    #   "error":"invalid_request"
    # } 
    Net::OATH::Server::Lite::Error->throw() if ...

    # custom error
    # HTTP/1.1 404 Not Found
    # Content-Type: application/json;charset=UTF-8
    # Cache-Control: no-store
    # Pragma: no-cache
    #
    # {
    #   "error":"invalid_request",
    #   "error_description":"invalid id"
    # } 
    Net::OATH::Server::Lite::Error->throw(
        code => 404,
        description => q{invalid id},
    ) if ...