Fixed error handling

https://trello.com/c/hXskreUL/1743-api-blueprint-api-hangs-with-this-blueprint