{
    "content": [
        {
            "type": "text",
            "text": "# Net::Twitter::Error (perldoc)\n\n## NAME\n\nNet::Twitter::Error - A Net::Twitter exception object\n\n## SYNOPSIS\n\nuse Scalar::Util qw/blessed/;\nuse Try::Tiny;\nmy $nt = Net::Twitter->new(@options);\nmy $followers = try {\n$nt->followers;\n}\ncatch {\ndie $ unless blessed($) && $->isa('Net::Twitter::Error');\nwarn \"HTTP Response Code: \", $->code, \"\\n\",\n\"HTTP Message......: \", $->message, \"\\n\",\n\"Twitter error.....: \", $->error, \"\\n\",\n\"Stack Trace.......: \", $->stacktrace->asstring, \"\\n\";\n};\n\n## DESCRIPTION\n\nNet::Twitter::Error encapsulates the \"HTTP::Response\" and Twitter error HASH (if any) resulting\nfrom a failed API call.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **METHODS** (1 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n- **LICENSE**\n- **DISCLAIMER OF WARRANTY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::Twitter::Error",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::Twitter::Error - A Net::Twitter exception object",
        "synopsis": "use Scalar::Util qw/blessed/;\nuse Try::Tiny;\nmy $nt = Net::Twitter->new(@options);\nmy $followers = try {\n$nt->followers;\n}\ncatch {\ndie $ unless blessed($) && $->isa('Net::Twitter::Error');\nwarn \"HTTP Response Code: \", $->code, \"\\n\",\n\"HTTP Message......: \", $->message, \"\\n\",\n\"Twitter error.....: \", $->error, \"\\n\",\n\"Stack Trace.......: \", $->stacktrace->asstring, \"\\n\";\n};",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 43,
                "subsections": [
                    {
                        "name": "stack_frame",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DISCLAIMER OF WARRANTY",
                "lines": 16,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::Twitter::Error - A Net::Twitter exception object\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 4.01043\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Scalar::Util qw/blessed/;\nuse Try::Tiny;\n\nmy $nt = Net::Twitter->new(@options);\n\nmy $followers = try {\n$nt->followers;\n}\ncatch {\ndie $ unless blessed($) && $->isa('Net::Twitter::Error');\n\nwarn \"HTTP Response Code: \", $->code, \"\\n\",\n\"HTTP Message......: \", $->message, \"\\n\",\n\"Twitter error.....: \", $->error, \"\\n\",\n\"Stack Trace.......: \", $->stacktrace->asstring, \"\\n\";\n};\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Net::Twitter::Error encapsulates the \"HTTP::Response\" and Twitter error HASH (if any) resulting\nfrom a failed API call.\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new Constructs a \"Net::Twitter::Error\" object. It accepts the following parameters:\n\nhttpresponse\nAn \"HTTP::Response\" object, required.\n\ntwittererror\nThe error returned by Twitter as a HASH ref. Optional, since some API errors do not\ninclude a response from Twitter. They may, instead, be the result of network timeouts,\nproxy errors, or some other problem that prevents an API response.\n\ntwittererror\nGet or set the Twitter error HASH.\n\nhttpresponse\nGet or set the \"HTTP::Response\" object.\n\ncode\nReturns the HTTP response code.\n\nmessage\nReturns the HTTP response message.\n\nhastwittererror\nReturns true if the object contains a Twitter error HASH.\n\nerror\nReturns the \"error\" value from the \"twittererror\" HASH ref if there is one. Otherwise, it\nreturns the string \"[unknown]\". Includes a stack trace.\n\ntwittererrortext\nReturns the \"error\" value from the \"twittererror\" HASH ref if there is one. Otherwise,\nreturns an empty string\n\ntwittererrorcode\nReturns the first numeric twitter error code from the JSON response body, if there is one.\nOtherwise, it returns 0 so the result should always be safe use in a numeric test.\n\nSee Twitter Error Codes <https://dev.twitter.com/docs/error-codes-responses> for a list of\ndefined error codes.\n\nstacktrace\nReturns a Devel::StackTrace object.\n",
                "subsections": [
                    {
                        "name": "stack_frame",
                        "content": "Returns the $ith stack frame as a Devel::StackTrace::Frame object.\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "Net::Twitter\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Marc Mims <marc@questright.com>\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "Copyright (c) 2016 Marc Mims\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            },
            "DISCLAIMER OF WARRANTY": {
                "content": "BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE\nEXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER\nEXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE\nSOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY\nSERVICING, REPAIR, OR CORRECTION.\n\nIN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER,\nOR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE\nLICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR\nCONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT\nLIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR\nOTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n",
                "subsections": []
            }
        }
    }
}