Skip to content

Commit

Permalink
Clean the struct before we try to serialize it
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonsturgeon committed Nov 29, 2022
1 parent aba5ae3 commit 3eaa2c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions moon/cfc_err_forwarder/error_forwarder.moon
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ return class ErrorForwarder

forwardError: (errorStruct, onSuccess, onFailure) =>
@logger\debug "Sending error object.."
data = @cleanStruct errorStruct

self.discord data, onSuccess, onFailure
self.discord errorStruct, onSuccess, onFailure

forwardErrors: =>
for errorString, errorData in pairs @queue
for errorString, data in pairs @queue
@logger\debug "Processing queued error: #{errorString}"

errorData = @cleanStruct data

onSuccess = -> @onSuccess errorString
onFailure = (failure) -> @onFailure errorString, failure, errorData

Expand Down

0 comments on commit 3eaa2c5

Please sign in to comment.