On app creation, if a health check references a portIndex outside the bounds of ports, a HTTP 500 is thrown. This is true even if there are sufficient portMappings to satisfy the index reference.
Here's the app:
Here's the response:
Here's the logged exception:
[~ConnorDoyle] mentioned the root cause is likely the JSON validator.
Additionally, it would be helpful to note in the docs that ports is ignored if portMappings is provided.