Effect CommunityEC
Effect Community2y ago
10 replies
Karl

Capturing Response Content from Failed fetchOk Requests

Is there a way to get the response content of a failed request when using fetchOk?
Currently I can capture the ResponseError tag, but the error object has a message, which is only "non 2xx error...", and there is a e.response.text/json, which returns an effect that can fail on ResponseError again. Upon access text/json, it will throw, so there seems to be no way to get the error content with fetchOk.
Was this page helpful?