Correctly handle RestErrors