[firestore] fix incomplete transaction error stack
This commit is contained in:
parent
317b02b901
commit
88410b409a
|
@ -72,7 +72,7 @@ export default class TransactionHandler {
|
||||||
updateFunction,
|
updateFunction,
|
||||||
stack: new Error().stack
|
stack: new Error().stack
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.slice(4)
|
.slice(2)
|
||||||
.join('\n'),
|
.join('\n'),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ export default class TransactionHandler {
|
||||||
// $FlowExpectedError: code is needed for Firebase errors
|
// $FlowExpectedError: code is needed for Firebase errors
|
||||||
errorWithStack.code = code;
|
errorWithStack.code = code;
|
||||||
// $FlowExpectedError: stack should be a stack trace
|
// $FlowExpectedError: stack should be a stack trace
|
||||||
errorWithStack.stack = meta.stack;
|
errorWithStack.stack = `Error: ${message}\n${meta.stack}`;
|
||||||
|
|
||||||
// $FlowExpectedError: Reject will always be present
|
// $FlowExpectedError: Reject will always be present
|
||||||
meta.reject(errorWithStack);
|
meta.reject(errorWithStack);
|
||||||
|
|
Loading…
Reference in New Issue