backend: handling errors (tests)