Add support for custom errors from server