Skip to content

Commit

Permalink
Merge pull request #128 from fastly/katie/zero-exit-status-code
Browse files Browse the repository at this point in the history
𝟎 only log non-zero exit status codes
  • Loading branch information
katelyn martin authored Feb 11, 2022
2 parents 8b96b78 + 5996ed9 commit e7ca791
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,10 @@ impl ExecuteCtx {
.await
.map(|_| ())
.map_err(|trap| {
event!(Level::ERROR, "WebAssembly trapped: {}", trap);
// Be sure that we only log non-zero status codes.
if trap.i32_exit_status() != Some(0) {
event!(Level::ERROR, "WebAssembly trapped: {}", trap);
}
ExecutionError::WasmTrap(trap)
});

Expand Down

0 comments on commit e7ca791

Please sign in to comment.