Error handling ra postgraphile:截获错误api响应

Error handling ra postgraphile:截获错误api响应,error-handling,react-admin,postgraphile,Error Handling,React Admin,Postgraphile,我使用ra postgraphile作为react admin项目的数据提供者,我需要截获错误api响应。是否有任何错误对象或函数可用于此?如果是,我可以得到一份文件 还发布了一个问题 源代码 const httpLink=createHttpLink({ uri:Config.postgraphileUrl }); const authLink=setContext(({headers})=>({ 标题:{ …标题, 授权:令牌?`Bearer${token}`:'', “内容类型”:“应用程

我使用ra postgraphile作为react admin项目的数据提供者,我需要截获错误api响应。是否有任何错误对象或函数可用于此?如果是,我可以得到一份文件

还发布了一个问题

源代码

const httpLink=createHttpLink({
uri:Config.postgraphileUrl
});
const authLink=setContext(({headers})=>({
标题:{
…标题,
授权:令牌?`Bearer${token}`:'',
“内容类型”:“应用程序/json”
}
}));
const客户端=新客户端({
链接:authLink.concat(httpLink),
缓存:新的InMemoryCache()
});
useffect(()=>{
(异步()=>{
const dataProvider=等待pgDataProvider(客户端);
setDataProvider(()=>dataProvider);
})();
}, []);