cube.js 新版本的一些特性

最近版本(0.26.100)包含一个很不错的特性支持在checkAuth进行自定义异常以及状态码的返回处理

自定义状态码参考使用

const {CubejsHandlerError} = require("@cubejs-backend/api-gateway")
module.exports = {
  checkAuth: (req, auth) => {
    throw new CubejsHandlerError(401,"auth error","not auth")
  },
};

参考资料

https://github.com/cube-js/cube.js/releases/tag/v0.26.100

posted on 2021-04-20 20:01  荣锋亮  阅读(108)  评论(0编辑  收藏  举报

导航