Skip Menu |

This queue is for tickets about the WebService-SendGrid CPAN distribution.

Report information
The Basics
Id: 108408
Status: resolved
Priority: 0/
Queue: WebService-SendGrid

People
Owner: JLLOYD [...] cpan.org
Requestors: DVINCI [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.02
Fixed in: 1.03



Subject: API returns invalid date header parameter
First let me say that your module helps me so much, thank you. The problem is that SendGrid is returning an error message: '{"errors":["Invalid Date Header Parameter"],"message":"error"}'. I did a simple and fast debug and I could see that the date is in a wrong format at http request header. # This is a module date dumped Tue, 3 Nov 2015 12:05:10 +0000 # This is an example of date ok Tue, 03 Nov 2015 12:05:10 GMT Fix suggestion: I created a hack using DateTime::Format::HTTP module, setting again the date header property of WebService::SendGrid::Mail object and it seems that this solved the problem. Thanks in advance. __CODE__ my $mail = WebService::SendGrid::Mail->new(%$params); $mail->{date} = DateTime::Format::HTTP->format_datetime(DateTime->now);
Subject: Re: [rt.cpan.org #108408] API returns invalid date header parameter
Date: Wed, 4 Nov 2015 17:02:06 -0800
To: bug-WebService-SendGrid [...] rt.cpan.org
From: Jonathan Lloyd <webmaster [...] lifegames.org>
Hi Daniel, Thanks for your kind words and feedback. I will get this incorporated in to the project and push it up to CPAN this weekend. On Tue, Nov 3, 2015 at 8:40 AM, Daniel Vinciguerra via RT < bug-WebService-SendGrid@rt.cpan.org> wrote: Show quoted text
> Tue Nov 03 11:40:14 2015: Request 108408 was acted upon. > Transaction: Ticket created by DVINCI > Queue: WebService-SendGrid > Subject: API returns invalid date header parameter > Broken in: 1.02 > Severity: Important > Owner: Nobody > Requestors: DVINCI@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=108408 > > > > > First let me say that your module helps me so much, thank you. > > The problem is that SendGrid is returning an error message: > '{"errors":["Invalid Date Header Parameter"],"message":"error"}'. > > I did a simple and fast debug and I could see that the date is in a wrong > format at http request header. > > # This is a module date dumped > Tue, 3 Nov 2015 12:05:10 +0000 > > # This is an example of date ok > Tue, 03 Nov 2015 12:05:10 GMT > > > Fix suggestion: > > I created a hack using DateTime::Format::HTTP module, setting again the > date header property of WebService::SendGrid::Mail object and it seems that > this solved the problem. > > Thanks in advance. > > __CODE__ > my $mail = WebService::SendGrid::Mail->new(%$params); > $mail->{date} = DateTime::Format::HTTP->format_datetime(DateTime->now); > > >
-- Jonathan Lloyd (714) 712-0638