[firestore] fix incomplete transaction error stack
This commit is contained in:
parent
317b02b901
commit
88410b409a
|
@ -72,7 +72,7 @@ export default class TransactionHandler {
|
|||
updateFunction,
|
||||
stack: new Error().stack
|
||||
.split('\n')
|
||||
.slice(4)
|
||||
.slice(2)
|
||||
.join('\n'),
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue