produce better errors in RestController

do not invoke RestController if the request url is not an object url
fixup query string in RestController in such a way that is actually visible