Page MenuHomePhabricator

bad curl causes citoid to respond with a traceback
Closed, ResolvedPublic1 Estimated Story Points

Description

curl -d '{"url":"http://www.lemonde.fr/politiq"format":"badformat"}' --header "Content-Type: application/json" localhost:1970/url
TypeError: Cannot call method &#39;log&#39; of undefined<br> &nbsp; &nbsp;at /home/marielle/Code/Node/citoid/lib/util.js:193:14<br> &nbsp; &nbsp;at Layer.handle_error (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/layer.js:58:5)<br> &nbsp; &nbsp;at trim_prefix (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:300:13)<br> &nbsp; &nbsp;at /home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:270:7<br> &nbsp; &nbsp;at Function.proto.process_params (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:321:12)<br> &nbsp; &nbsp;at next (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:261:10)<br> &nbsp; &nbsp;at Layer.handle_error (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/layer.js:54:12)<br> &nbsp; &nbsp;at trim_prefix (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:300:13)<br> &nbsp; &nbsp;at /home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:270:7<br> &nbsp; &nbsp;at Function.proto.process_params (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:321:12)<br> &nbsp; &nbsp;at next (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:261:10)<br> &nbsp; &nbsp;at Layer.handle_error (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/layer.js:54:12)<br> &nbsp; &nbsp;at trim_prefix (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:300:13)<br> &nbsp; &nbsp;at /home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:270:7<br> &nbsp; &nbsp;at Function.proto.process_params (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:321:12)<br> &nbsp; &nbsp;at next (/home/marielle/Code/Node/citoid/node_modules/express/lib/router/index.js:261:10)

Details

Related Changes in Gerrit:

Event Timeline

Mvolz raised the priority of this task from to Needs Triage.
Mvolz updated the task description. (Show Details)
Mvolz added projects: Citoid, Services.
Mvolz moved this task to Service on the Citoid board.
Mvolz added subscribers: Mvolz, mobrovac.
Mvolz triaged this task as Medium priority.Apr 13 2015, 3:27 PM
Mvolz updated the task description. (Show Details)
Mvolz set Security to None.

This is a consequence of T96009 and happens only for POST requests.

Strike that, in the template works as expected. It still happens only for POST requests, while GET requests kill Citoid. We will need to investigate this a bit thoroughly. One possible cause is that async and promises do not mix well. That would explain the crash for GET requests, but probably not for POSTs...

mobrovac moved this task from Backlog to Waiting on Deploy on the Citoid board.

Change 205872 had a related patch set uploaded (by Mobrovac):
Update citoid to 7e3ee47

https://gerrit.wikimedia.org/r/205872