When I am triggering a trackGoal call with Matomo, if the goal isn't defined for the site I'm tracking or I've got the siteId wrong (i.e. a typo, etc). Matomo reports an HTTP 400 response when POSTing my Goal tracking event. This appears in the browser console with no clear information stating what the problem is.
What would be nice would be if Matomo could log an error saying something like "Goal not found" to help debug.