Skip to content
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
This repository was archived by the owner on Jan 22, 2019. It is now read-only.

HTTP status 599, no error message and "authentication" : true error #14

Open
@clrh

Description

@clrh

I am trying to do the simplest thing with trello and Net::HTTP::Spore lib. (https://github.com/clrh/trello-spore-perl)

I don't understand why it doesn't work, logs do not give me more data...

$ perl trello.pl ; echo ""; cat logs/log_spore_trello.log 
HTTP status: 599
== enabling middleware Net::HTTP::Spore::Middleware::Format::JSON

> GET /1/boards/4e7279550a78dcdfe520b4f7?key=2c0dd858791fbb92730a6dc2af0cfcca&token=f905312900d0ba42e0d86703b576f2a4a2166b4670ab09ca15bfa883e827ec21&cards=all
> Host: api.trello.com
> Accept: application/json
> User-Agent: Net::HTTP::Spore v0.03 (Perl)
> < Connection: keep-alive
> < Content-Length: 12
> < Content-Type: text/plain; charset=utf-8
> < Access-Control-Allow-Methods: GET, PUT, POST, DELETE
> < Access-Control-Allow-Origin: *
> < Client-Date: Tue, 28 Feb 2012 12:48:32 GMT
> < Client-Peer: 64.34.80.210:443
> < Client-Response-Num: 1
> < Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
> < Client-SSL-Cert-Subject: /C=US/ST=New York/L=New York/O=Fog Creek Software, Inc./OU=Technical/CN=*.trello.com
> < Client-SSL-Cipher: AES256-SHA
> < Client-SSL-Warning: Peer certificate not verified
> < Client-Warning: Redirect loop detected (max_redirect = 0)
> < X-Powered-By: Express

Finally I thought "authentication" spore param was missing but I have an error when I add "authentication":true in trello.json

unable to create new Net::HTTP::Spore object: Attribute (authentication) does not pass the type constraint because: Validation failed for 'Bool' with value JSON::XS::Boolean=SCALAR(0x91d7af8) at /usr/local/lib/perl/5.10.1/Moose/Meta/Attribute.pm line 1275


    Moose::Meta::Attribute::verify_against_type_constraint('Moose::Meta::Attribute=HASH(0x96cd7b8)', 'JSON::XS::Boolean=SCALAR(0x91d7af8)', 'instance', 'Class::MOP::Class::**ANON**::SERIAL::11=HASH(0x999fe28)') called at /usr/local/lib/perl/5.10.1/Moose/Meta/Attribute.pm line 1262
    Moose::Meta::Attribute::_coerce_and_verify('Moose::Meta::Attribute=HASH(0x96cd7b8)', 'JSON::XS::Boolean=SCALAR(0x91d7af8)', 'Class::MOP::Class::__ANON__::SERIAL::11=HASH(0x999fe28)') called at /usr/local/lib/perl/5.10.1/Moose/Meta/Attribute.pm line 531
    Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0x96cd7b8)', 'Moose::Meta::Instance=HASH(0x9981a38)', 'Class::MOP::Class::**ANON**::SERIAL::11=HASH(0x999fe28)', 'HASH(0x99818c8)') called at /usr/local/lib/perl/5.10.1/Class/MOP/Class.pm line 525
    Class::MOP::Class::_construct_instance('Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x999f828)', 'HASH(0x99818c8)') called at /usr/local/lib/perl/5.10.1/Class/MOP/Class.pm line 498
    Class::MOP::Class::new_object('Moose::Meta::Class::**ANON**::SERIAL::1=HASH(0x999f828)', 'HASH(0x99818c8)') called at /usr/local/lib/perl/5.10.1/Moose/Meta/Class.pm line 274
    Moose::Meta::Class::new_object('Moose::Meta::Class::**ANON**::SERIAL::1=HASH(0x999f828)', 'formats', 'ARRAY(0x96bd158)', 'trace', '1=logs/log_spore_trello.log', 'base_url', 'https://api.trello.com', 'authentication', 'JSON::XS::Boolean=SCALAR(0x91d7af8)') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 107
    Net::HTTP::Spore::**ANON**() called at /usr/share/perl5/Try/Tiny.pm line 76
    eval {...} called at /usr/share/perl5/Try/Tiny.pm line 67
    Try::Tiny::try('CODE(0x999f408)', 'Try::Tiny::Catch=REF(0x999f3c8)') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 114
    Net::HTTP::Spore::_attach_spec_to_class('{\x{a}    "name" : "Trello-Perl",\x{a}    "base_url" : "https://api.t...', 'HASH(0x91f0018)', 'Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x999f828)') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 27
    Net::HTTP::Spore::new_from_string('Net::HTTP::Spore', '{\x{a}    "name" : "Trello-Perl",\x{a}    "base_url" : "https://api.t...', 'trace', '1=logs/log_spore_trello.log') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 59
    Net::HTTP::Spore::new_from_spec('Net::HTTP::Spore', 'spec/trello.json', 'trace', '1=logs/log_spore_trello.log') called at trello.pl line 9
 at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 113
    Net::HTTP::Spore::**ANON**('Attribute (authentication) does not pass the type constraint ...') called at /usr/share/perl5/Try/Tiny.pm line 100
    Try::Tiny::try('CODE(0x999f408)', 'Try::Tiny::Catch=REF(0x999f3c8)') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 114
    Net::HTTP::Spore::_attach_spec_to_class('{\x{a}    "name" : "Trello-Perl",\x{a}    "base_url" : "https://api.t...', 'HASH(0x91f0018)', 'Moose::Meta::Class::__ANON__::SERIAL::1=HASH(0x999f828)') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 27
    Net::HTTP::Spore::new_from_string('Net::HTTP::Spore', '{\x{a}    "name" : "Trello-Perl",\x{a}    "base_url" : "https://api.t...', 'trace', '1=logs/log_spore_trello.log') called at /usr/local/share/perl/5.10.1/Net/HTTP/Spore.pm line 59
    Net::HTTP::Spore::new_from_spec('Net::HTTP::Spore', 'spec/trello.json', 'trace', '1=logs/log_spore_trello.log') called at trello.pl line 9

Maybe I miss a really stupid thing, any idea could help me...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions