Message

foo must be a valid IRI

Explanation

The IRI contains an invalid character. A complete list of acceptable characters can be found in RFC 3987.

Solution

Replace the invalid characters with the proper escape sequence. For example, "{" and "}" characters should be replaced with "%7B" and "%7D" respectively.

Not clear? Disagree?

You might be able to find help in one of these fine resources.