{
"code": "ERR_INVALID_ARG_TYPE",
"message": "The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type undefined",
"stack": "TypeError [ERR_INVALID_ARG_TYPE]: The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type undefined\n at Function.byteLength (buffer.js:494:11)\n at respond (D:\\Develop\\projects\\zhifu\\api2\\node_modules\\koa\\lib\\application.js:245:25)\n at handleResponse (D:\\Develop\\projects\\zhifu\\api2\\node_modules\\koa\\lib\\application.js:149:34)\n at processTicksAndRejections (internal/process/task_queues.js:85:5)",
"name": "TypeError",
"status": 500
}
when use egg-oauth2-server plugin as global middleware:
then output:
[AsyncFunction]
when use
authenticate()
in egg controller:then throw: