-
Notifications
You must be signed in to change notification settings - Fork 13
Description
When the Dynatrace plugin is configured with an incorrect or incomplete URL, the plugin throws a vague and misleading error:
❌ Error: Unexpected token '<', "<!DOCTYPE "… is not valid JSON
This occurs because the plugin tries to parse an HTML response (typically a login page or error page) as JSON. This often happens when the API URI is not appended to the Dynatrace URL or authentication fails.
Suggested Improvement
Instead of a generic JSON parsing error, the plugin should:
Detect and handle non-JSON responses.
Show a user-friendly message like:
“The provided Dynatrace URL did not return valid JSON. Please double-check the configured URL and authentication setup.”
Optionally, link to relevant documentation to guide users on the correct format for the Dynatrace API URL.
(Nice-to-have) Validate the configured URL proactively during plugin setup to alert users of potential misconfiguration early.