In case somebody requests URLs like /restconf/ds/ietf-datastores:running/ we respond with invalid syntax error. I think that RFC 8040 + RFC 8527 say that there should not be the terminating slash.
Anyway, we should report what was wrong and not just "invalid syntax". Take a look at error handling and implemenent something prettier than just reporting true/false from the URL parser