diff --git a/script/src/error.rs b/script/src/error.rs index cac50b738d..633843196b 100644 --- a/script/src/error.rs +++ b/script/src/error.rs @@ -182,7 +182,13 @@ impl ScriptError { impl From for Error { fn from(error: TransactionScriptError) -> Self { - ErrorKind::Script.because(error) + // check error.cause is ScriptError::Other("stopped")? + match error.cause { + ScriptError::Other(ref reason) if reason == "stopped" => { + ErrorKind::Internal.because(error) + } + _ => ErrorKind::Script.because(error), + } } }