Fixed error handling

https://trello.com/c/N7TSt5CB/1612-api-for-parsing-blueprint-from-markdown-to-ast