Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
fix: null stack (#529)
Browse files Browse the repository at this point in the history
Not sure this is the source of the error but trying it
  • Loading branch information
LarsLiden authored Dec 16, 2019
1 parent a718900 commit 9edc630
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/CLRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1505,8 +1505,9 @@ export class CLRunner {
// Store changes to filled entities
logicResult.changedFilledEntities = CLM.ModelUtils.changedFilledEntities(entityMapBeforeCall, memoryManager.curMemories)
}
catch (error) {
let botAPIError: CLM.LogicAPIError = { APIError: error.stack || error.message || error }
catch (e) {
const error: Error = e
let botAPIError: CLM.LogicAPIError = { APIError: error.stack || error.message || JSON.stringify(error) }
logicResult.logicValue = JSON.stringify(botAPIError)
replayError = new CLM.ReplayErrorAPIException()
}
Expand Down Expand Up @@ -1565,9 +1566,10 @@ export class CLRunner {
}
}
}
catch (err) {
catch (e) {
const error: Error = e
const title = `${CLStrings.EXCEPTION_API_CALLBACK}'${apiAction.name}'`
const message = this.RenderErrorCard(title, err.stack || err.message || "")
const message = this.RenderErrorCard(title, error.stack || error.message || "")
const replayError = new CLM.ReplayErrorAPIException()
return {
logicResult: undefined,
Expand Down

0 comments on commit 9edc630

Please sign in to comment.