distinguish local and remote errors