Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an error while searching for a registered company #55

Open
codeinuit opened this issue Jun 1, 2018 · 0 comments
Open

Getting an error while searching for a registered company #55

codeinuit opened this issue Jun 1, 2018 · 0 comments

Comments

@codeinuit
Copy link

codeinuit commented Jun 1, 2018

Hello.

I'm using the REST api for a node project (because the Node.js api don't provide enough functions to do what i want.), but when i search for a company, i get an serverside error.

Here what i got :

error:
{ Error: cannot GET /dev/api/search?q=Porostase&page_size=10&type=COMPANY (500)
at Response.toError (/home/node/app/node_modules/superagent/lib/node/response.js:94:15)
at ResponseBase._setStatusProperties (/home/node/app/node_modules/superagent/lib/response-base.js:123:16)
at new Response (/home/node/app/node_modules/superagent/lib/node/response.js:41:8)
at Request._emitResponse (/home/node/app/node_modules/superagent/lib/node/index.js:742:20)
at IncomingMessage.parser (/home/node/app/node_modules/superagent/lib/node/index.js:906:38)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
status: 500,
text: '\n\n<title>500 Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: application/xml</title>\n\n\n

Error: Could not find MessageBodyWriter for response object of type: java.util.ArrayList of media type: application/xml

\n\n',
method: 'GET',
path: '/dev/api/search?q=Porostase&page_size=10&type=COMPANY' },

My request looks like that :
superagent .get('https://{DOMAIN}.agilecrm.com/dev/api/search?q=Porostase&page_size=10&type=COMPANY') .set('Content-Type', 'application/json') .auth(config.agilecrm.email, config.agilecrm.apikey) .end(function(err, response) { console.log(response); return response.statusCode; });

(I've replaced the domain by {DOMAIN} for confidentiality.)

Can't fetch the list too when i'm using CURL and the exemple request.

Here's what i got with CURL:

curl: (92) HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

Am i doing wrong ?

Thanks in advance.
Lucas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant