@lbendlin thanks for the links.
I can't remember what the API was that I was trying to add, but it turns out the error is in the source code of my power BI API connection, not sure if it is something imported or was auto generated, as I don't even know how I eventually got the connection working. Anyways to fix it I had to go into the swagger code mode to find the error, something to do with a new authorization URL that needed to be added, but doesn't have a placeholder to set a value (that I am aware of) in the custom connection editor. I just copied the URL from the line below it in the code (login URL I think) and it accepted it without issue.