Route with hyphen (-) cast error

That’s because you already have an identical route for findOne:

{
  "method": "GET",
  "path": "/articles/:id",
  "handler": "article.findOne",
  "config": {
    "policies": []
  }
}

You should create a different route for your needs. When you are accessing route /articles/draft-to-publish it actually calls the findOne controller from the above example.

1 Like