I was looking into a way to add a custom global status code handler for XHR requests.
Looking at the source code, it seems that the handling of the status codes 422, 402, 403, 404, 410 and 429 is done globally when requests are done through the Flarum API.
First, is my interpretation correct? I'm actually unsure of what happens after that
switch... Is the error "banner" shown anyway or only when the requester doesn't handle the response?
In the first case, if I wanted to show a different error when the response code is for example 503, would that be possible through an extension? Would I need to override the whole
request function and tweak it? (Is that even possible since it's the
Thanks in advance for your thoughts and inputs!