I wish there’s no such thing as error 522.
What would you like there to be instead? Just no response at all to give you an indication of the problem?
A 522 error typically happens when Cloudflare requests to the origin (your webserver) get blocked. It’s generally not a Cloudflare issue that causes this error. Most of the time, it’s an issue with the server, or today with Third party transit provider issue causing increased HTTP 5xx errors, it is an issue with a transit provider.