Get Backend Error Message
const client = Http.client.fetchOk.pipe(Is there any way to get the message that I receive from the backend?
Http.client.mapRequest(
Http.request.prependUrl(${config.VITE_APP_DEFAULT_URL}/api),
),
Http.client.mapRequest(Http.request.bearerToken(api.getToken() ?? "")),
);
const get = Http.request.get("").pipe(
client,
Http.response.json,
Effect.catchTags({
ResponseError: (err) => {
console.log({ error: err });
return Effect.fail(err)
},
}),
);
{
"statusCode":400,
"message":"Not allowed client scope \"united-admin-panel\""
}