[dancer-users] status issue

Lyn St George lyn at zolotek.net
Thu Feb 27 15:48:34 GMT 2020


On Wed, 26 Feb 2020 11:31:57 -0800
Chad Wallace <cwallace at lodgingcompany.com> wrote:

> On Wed, 26 Feb 2020 13:25:33 +0000
> Lyn St George <lyn at zolotek.net> wrote:
> 
> > Trying to send a 'status 200' back to Stripe from a webhook, using
> > D2 0.30000, perl 5.30.0 on Gentoo.
> > 
> > Using either:
> > 	status 200
> > 	Dancer2::Core::HTTP->status(200); 
> >  	$self->app->response->status( '200' );
> > or indeed nothing (as D2 apparently sends a status anyway),
> > the result is:  
> 
> Have you tried just returning your content?  That would give a 200
> status.  If you want no content, you should be able to return the
> empty string:
> 
>     return '';



Thanks Chad
I need to parse the content after the status response. Given that D2
sends a status anyway without being explicitly told to, this looks more
like a bug.


 
> 
> > Route exception: Undef did not pass type constraint "Num" (in
> > $self->{"status"})
> > at /usr/local/lib64/perl5/5.30.0/Dancer2/Core/DSL.pm line 279 "Num"
> > is a subtype of "LaxNum" "LaxNum" is a subtype of "Str" "Str" is a
> > subtype of "Value" "Value" is a subtype of "Defined"
> >     Undef did not pass type constraint "Defined" (in
> > $self->{"status"}) "Defined" is defined as: (defined($_))
> > in /usr/local/lib64/perl5/5.30.0/Dancer2/Core/App.pm l. 1488  
> 



More information about the dancer-users mailing list