diff --git a/lib/methods/index.js b/lib/methods/index.js index cae63d4..fd6971c 100644 --- a/lib/methods/index.js +++ b/lib/methods/index.js @@ -163,6 +163,7 @@ const Methods = ({ * @returns {any} */ async test(data, ctx) { + const callData = {...data}; const m = this.find({name: data.method}); if (m) { this.log('debug', 'Found', data.method, data); @@ -187,8 +188,8 @@ const Methods = ({ mr.params = r; } catch (e) { mr.params = undefined; - mr.error = e?.error || e; - this.log('error', 'Methods', mr.error); + mr.error = e?.error?.stack || e?.stack; + this.log('error', 'Methods', mr.error, callData); } if (!data.id) { return;