Comments (5)
Provide more information how to reproduce the error. The application taken from the POD works as expected and returns success.
Here is my query:
curl -v -X POST -d name=test -d password=qwe 127.0.0.1:5000/users
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 5000 (#0)
> POST /users HTTP/1.1
> Host: 127.0.0.1:5000
> User-Agent: curl/7.47.1
> Accept: */*
> Content-Length: 22
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 22 out of 22 bytes
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Mon, 29 Feb 2016 07:38:10 GMT
< Server: HTTP::Server::PSGI
< Content-Type: application/yaml
< X-Framework: Raisin 0.63
< Content-Length: 15
<
---
success: 1
* Closing connection 0
from raisin.
OK, I found an error. Initially I took an example from the examples/ folder, but the error is in POD which misses List::Util::max.
Please improve log of your application. And in if any further bugs were found please file an issue with all details provided as you have access to the server application.
from raisin.
Hi Artur! The test suite could be reproduced on your machine:
cpanm Sparrow
sparrow index update
sparrow plg install swat-raisin
sparrow plg run swat-raisin
from raisin.
a detailed log is here:
vagrant@Debian-jessie-amd64-netboot:~/my/swat-raisin$ curl -X POST -k --connect-timeout 20 -m 20 -L -d name=alex -d password=123 -D - '127.0.0.1:5000/users'
HTTP/1.0 500 Internal Server Error
Date: Mon, 29 Feb 2016 07:59:09 GMT
Server: HTTP::Server::PSGI
Content-Type: text/plain
X-Framework: Raisin 0.63
Content-Length: 4079
Undefined subroutine &Plack::Sandbox::_2fhome_2fvagrant_2fsparrow_2fplugins_2fpublic_2fswat_2draisin_2fapp_2epsgi::max called at /home/vagrant/sparrow/plugins/public/swat-raisin/app.psgi line 83.
at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Raisin.pm line 77.
Raisin::__ANON__(HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Middleware/CrossOrigin.pm line 114
Plack::Middleware::CrossOrigin::call(Plack::Middleware::CrossOrigin=HASH(0x2829438), HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Middleware/Lint.pm line 24
Plack::Middleware::Lint::call(Plack::Middleware::Lint=HASH(0x1e14fd0), HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Middleware/StackTrace.pm line 38
Plack::Middleware::StackTrace::try {...} () called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Try/Tiny.pm line 90
eval {...} called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Try/Tiny.pm line 83
Try::Tiny::try(CODE(0x2a2b4f0), Try::Tiny::Catch=REF(0x2b0d840)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Middleware/StackTrace.pm line 42
Plack::Middleware::StackTrace::call(Plack::Middleware::StackTrace=HASH(0x263ed78), HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Middleware/AccessLog.pm line 27
Plack::Middleware::AccessLog::call(Plack::Middleware::AccessLog=HASH(0x263eaf0), HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Middleware/ContentLength.pm line 10
Plack::Middleware::ContentLength::call(Plack::Middleware::ContentLength=HASH(0x2876a98), HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__(HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Util.pm line 145
eval {...} called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Util.pm line 145
Plack::Util::run_app(CODE(0x28767f8), HASH(0x2ab1460)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/HTTP/Server/PSGI.pm line 170
HTTP::Server::PSGI::handle_connection(HTTP::Server::PSGI=HASH(0x28763d8), HASH(0x2ab1460), IO::Socket::INET=GLOB(0x2ab6ea0), CODE(0x28767f8)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/HTTP/Server/PSGI.pm line 129
HTTP::Server::PSGI::accept_loop(HTTP::Server::PSGI=HASH(0x28763d8), CODE(0x265c760)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/HTTP/Server/PSGI.pm line 55
HTTP::Server::PSGI::run(HTTP::Server::PSGI=HASH(0x28763d8), CODE(0x265c760)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Handler/HTTP/Server/PSGI.pm line 14
Plack::Handler::HTTP::Server::PSGI::run(Plack::Handler::Standalone=HASH(0x2876a80), CODE(0x265c760)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Loader.pm line 84
Plack::Loader::run(Plack::Loader=HASH(0x1aca270), Plack::Handler::Standalone=HASH(0x2876a80)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/lib/perl5/Plack/Runner.pm line 277
Plack::Runner::run(Plack::Runner=HASH(0x1851260)) called at /home/vagrant/sparrow/plugins/public/swat-raisin/local/bin/plackup line 10
from raisin.
it's ok now after adding missed dependency -
http://swatpm.org/cpanparty/#swat-raisin
2016-02-29 10:48 GMT+03:00 Artur Khabibullin [email protected]:
—
Reply to this email directly or view it on GitHub
#16 (comment).
from raisin.
Related Issues (20)
- Ideas to discuss HOT 4
- Improvement: allow swagger to reside behind a reverse proxy
- Request for clarification HOT 3
- Reverse proxy not done correctly HOT 7
- escaping colon in resource path
- Presenting DBIx::Class::ResultSet does not work correctly HOT 6
- please tag recent CPAN releases in git HOT 1
- Regex check in Raisin::Entity flags numbers as strings for JSON::XS
- Bump version to 0.94 please? HOT 3
- route_param regex is broken by R::Routes::Endpoint::_build_regex if contains quantifiers...
- Participate in hacktoberfest?
- question: can Raisin handle file uploads ? HOT 1
- Optional params that fail type constraints do not return "Invalid Parameters" response.
- Encoder/Decoder are unable to cope with UTF-8 / wide characters.
- t/unit/plugin/swagger.t fails (with Type::Tiny 1.006000?) HOT 5
- Feature Request: Swagger schemes
- $count in SYNOPSIS HOT 1
- Please include VERSION in all modules HOT 4
- Authentication module in Raisin HOT 3
- Disable the route extension. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raisin.