[dancer-users] status issue
Chad Wallace
cwallace at lodgingcompany.com
Wed Feb 26 19:31:57 GMT 2020
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 '';
> 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
--
C. Chad Wallace, B.Sc.
The Lodging Company
http://www.lodgingcompany.com/
OpenPGP Public Key ID: 0x262208A0
+1 250-869-4931 ext. 6251
More information about the dancer-users
mailing list