You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can't use an undefined value as an ARRAY reference at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/HTTP/Headers/ActionPack/Core/BaseHeaderType.pm line 38.
HTTP::Headers::ActionPack::Core::BaseHeaderType::new_from_string("HTTP::Headers::ActionPack::MediaType", undef) called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/HTTP/Headers/ActionPack.pm line 87
HTTP::Headers::ActionPack::create(HTTP::Headers::ActionPack=HASH(0x14c13e0), "MediaType") called at /home/autarch/projects/webmachine-perl/lib/Web/Machine/Util.pm line 32
Web::Machine::Util::create_header("MediaType") called at /home/autarch/projects/webmachine-perl/lib/Web/Machine/FSM/States.pm line 235
Web::Machine::FSM::States::c3(My::Resource::Test701=HASH(0x16d9428), Plack::Request=HASH(0x111e860), Plack::Response=HASH(0x161d358), HASH(0x18b1040)) called at /home/autarch/projects/webmachine-perl/lib/Web/Machine/FSM.pm line 62
Web::Machine::FSM::try {...} () called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Try/Tiny.pm line 81
eval {...} called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Try/Tiny.pm line 72
Try::Tiny::try(CODE(0x18b1058), Try::Tiny::Catch=REF(0x16e9f60)) called at /home/autarch/projects/webmachine-perl/lib/Web/Machine/FSM.pm line 129
Web::Machine::FSM::run(Web::Machine::FSM=HASH(0x1857750), My::Resource::Test701=HASH(0x16d9428)) called at /home/autarch/projects/webmachine-perl/lib/Web/Machine.pm line 93
Web::Machine::call(Web::Machine=HASH(0xbe26b0), HASH(0x161d400)) called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Plack/Component.pm line 50
Plack::Component::__ANON__[/home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Plack/Component.pm:50](HASH(0x161d400)) called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Plack/Test/MockHTTP.pm line 24
Plack::Test::MockHTTP::try {...} () called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Try/Tiny.pm line 79
eval {...} called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Try/Tiny.pm line 72
Try::Tiny::try(CODE(0x1695738), Try::Tiny::Catch=REF(0x1122f50)) called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Plack/Test/MockHTTP.pm line 27
Plack::Test::MockHTTP::request(Plack::Test::MockHTTP=HASH(0x180c218), HTTP::Request=HASH(0x180c188)) called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Plack/Test.pm line 38
Plack::Test::__ANON__(HTTP::Request=HASH(0x180c188)) called at t/701-content-type-is-actionpack.t line 52
main::__ANON__[t/701-content-type-is-actionpack.t:53](CODE(0x180c230)) called at /home/autarch/.perlbrew/libs/perl-5.22.0@dev/lib/perl5/Plack/Test.pm line 38
Plack::Test::test_psgi("app", CODE(0xbe2758), "client", CODE(0x180bb70)) called at t/701-content-type-is-actionpack.t line 54
The problem is that the code assumes that the resource will define at least one content type but doesn't check to make sure this is true.
@stevan - any thoughts on what we should do? At the very least we should provide a better error message, but I'm wondering if it might be better to try to work around this. Someone could create a resource class that manually sets the Content-Type header later in the response cycle, for example.
The text was updated successfully, but these errors were encountered:
autarch
changed the title
A resource which does not define known_content_type() will blow up on request
A resource which does not define content_types_provided() will blow up on request
Jul 5, 2015
Here's an example stack trace:
The problem is that the code assumes that the resource will define at least one content type but doesn't check to make sure this is true.
@stevan - any thoughts on what we should do? At the very least we should provide a better error message, but I'm wondering if it might be better to try to work around this. Someone could create a resource class that manually sets the Content-Type header later in the response cycle, for example.
The text was updated successfully, but these errors were encountered: