Undefined index: Controller


#1

SS4.3

I’m trying to add Routes to a routes.yml file, and every time I run dev/build I get the following error:

[Notice] Undefined index: Controller

### GET /dev/build?devbuildtoken=94af26bf9c50106ca7122b533a035c77&flush=&flushtoken=1f016c2e2210ddce5a1bbec207ea1b94

Line **439** in C:\projects\true\tmtoolkit\tmtoolkit\vendor\silverstripe\graphql\src\Controller.php**

My routes.yml code is as follows:
---
Name: approutes
After:
- '#rootroutes'
- '#coreroutes'
---
SilverStripe\Control\Director:
rules:
- 'region//$Action/$ID': 'RegionController'

If I take out the last line I don’t get an error


#2

It’s OK, I had a ‘-’ at the start of the last line, which apparently shouldn’t be there for routes.
The error message was a bit cryptic though