modifying error.code comparison handlings