This is still very basic and can be improved.
For one thing, the try/except blocks are repeated, but I'm not sure what's the
best way to refactor this stuff in aiohttp. (Is there a notion of global
excepton handler for routes?)
Second, I'm only validating PID parameters here, while others are given, such
as directions, edge restrictions, etc. They should all be checked for validity
and trigger bad request return codes rather then making the REST server explode
in the backend.
Third, tests for the returned HTTP status codes are missing, but it's not clear
to me yet how we're currently testing the HTTP layer of the REST server.
I'm also pushing this to the branch feature/param-validation, feel free to give
me feedback here but also make improvements directly in that branch.