diff options
Diffstat (limited to 'cli/ops/compiler.rs')
-rw-r--r-- | cli/ops/compiler.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs index baa7b4c1c..37e6bfd28 100644 --- a/cli/ops/compiler.rs +++ b/cli/ops/compiler.rs @@ -156,7 +156,8 @@ fn op_fetch_source_files( .map_err(|e| OpError::other(e.to_string()))? .code } - _ => String::from_utf8(file.source_code).unwrap(), + _ => String::from_utf8(file.source_code) + .map_err(|_| OpError::invalid_utf8())?, }; Ok::<_, OpError>(json!({ "url": file.url.to_string(), |