importRequestfrom'@zb81/req'// or import { Request } from '@zb81/req'// biz error messageconstERROR_MSG='That\'s bad...'// Instantiate with config and interceptorsconstrequest=newRequest({baseURL: 'https://httpbin.org',timeout: 10000,responseInterceptor(response){if(Math.random()>0.1)// biz error codethrownewError(ERROR_MSG)// you can throw the error, or show messagesreturnresponse.data},})