500 Internal Server Error with caldav, but calendar curls OK

I’m trying to subscribe to a calendar, and have set up a sensor:

calendar:
  - platform: caldav
    url: https://connect.garmin.com/modern/calendar/export/4909f144219046f6bdfdfdf53e4e91a7

When I restart HA there is no sensor, and I get the following error in the log:

  File "/usr/local/lib/python3.13/site-packages/caldav/objects.py", line 216, in _query
    raise error.exception_by_method[query_method](errmsg(ret))
caldav.lib.error.PropfindError: PropfindError at '500 Internal Server Error

b'<!doctype html><html lang="en"><head><title>HTTP Status 500 \xe2\x80\x93 Internal Server Error</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 500 \xe2\x80\x93 Internal Server Error</h1></body></html>'', reason no reason

However, I can subscribe successfully to the calendar URL using Apple Calendar on Mac OS, and it also gives what looks like a valid iCalendar response using curl:

(base) me@mymachine % curl https://connect.garmin.com/modern/calendar/export/4909f144219046f6bdfdfdf53e4e91a7
BEGIN:VCALENDAR
PRODID:-//Garmin Connect//ICalProvider 1.0//EN
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20241209T101055Z
SUMMARY:Easy 1hr
DTSTART;VALUE=DATE:20241209
UID:[email protected]
END:VEVENT
END:VCALENDAR

Given the rather vague 500 code, and the fact that it works fine via two other methods, I’m suddenly out of ideas. Does anyone have any suggestions as to silly things I may have missed, please? Thanks!

500 internal error is an error in the server, but it can sometimes be caused by a malformed call, like when the server format is changed and the client have not followed up.

Thanks. I’m using the built-in caldav integration so don’t have any control over the format of the call, unfortunately.