Add error details in remote calendar flow (#141753)

* Add error details in remote calendar flow

* no args

* adjust

* json

* Apply suggestions

* remove description placeholder
This commit is contained in:
Thomas55555 2025-04-05 18:07:06 +02:00 committed by Franck Nijhof
parent c25f26a290
commit ee5e3f7691
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 5 additions and 2 deletions

View File

@ -69,7 +69,10 @@ class RemoteCalendarConfigFlow(ConfigFlow, domain=DOMAIN):
)
except CalendarParseError as err:
errors["base"] = "invalid_ics_file"
_LOGGER.debug("Invalid .ics file: %s", err)
_LOGGER.error("Error reading the calendar information: %s", err.message)
_LOGGER.debug(
"Additional calendar error detail: %s", str(err.detailed_error)
)
else:
return self.async_create_entry(
title=user_input[CONF_CALENDAR_NAME], data=user_input

View File

@ -20,7 +20,7 @@
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"forbidden": "The server understood the request but refuses to authorize it.",
"invalid_ics_file": "[%key:component::local_calendar::config::error::invalid_ics_file%]"
"invalid_ics_file": "There was a problem reading the calendar information. See the error log for additional details."
}
},
"exceptions": {