Avoiding duplication of error messages
Added basic management of URIs identifying the agent.