Skip to content

Commit

Permalink
[firestore] fix incomplete transaction error stack
Browse files Browse the repository at this point in the history
  • Loading branch information
Salakar committed Apr 16, 2018
1 parent 317b02b commit 88410b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/modules/firestore/TransactionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class TransactionHandler {
updateFunction,
stack: new Error().stack
.split('\n')
.slice(4)
.slice(2)
.join('\n'),
};

Expand Down Expand Up @@ -215,7 +215,7 @@ export default class TransactionHandler {
// $FlowExpectedError: code is needed for Firebase errors
errorWithStack.code = code;
// $FlowExpectedError: stack should be a stack trace
errorWithStack.stack = meta.stack;
errorWithStack.stack = `Error: ${message}\n${meta.stack}`;

// $FlowExpectedError: Reject will always be present
meta.reject(errorWithStack);
Expand Down

0 comments on commit 88410b4

Please sign in to comment.