Skip to content

Commit

Permalink
fix: more info in error
Browse files Browse the repository at this point in the history
  • Loading branch information
Elin Angelow committed Apr 29, 2024
1 parent d5afde2 commit 6f7cbd6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/methods/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand Down

0 comments on commit 6f7cbd6

Please sign in to comment.