catch for bad characters in server URI parsing

Change-Id: I8bff20757e4cb0060d7b613e8d79f9580fc3a267

Signed-off-by: Christian Amend <chrisam@apache.org>