Change nestoria error handling to correctly determine all error codes