adapter/rest: add error parsing