Correctly handle and return parse errors