Unexpected error while trying to add Octoprint integration

I’m trying to connect my Home Assistant to Octoprint. I filled out username and host in the integration setup screen, clicked Submit, went to my Octoprint web UI in another tab, approved the request, and went back to Home Assistant only to find it showing the setup form again with the message “Unexpected error”. There is nothing in the octoprint error log, nor the home assistant error log.

How should I proceed with debugging this?