add res parsing to throw error when `expected` or `error` is present
fix toffee test, `should handle errors`