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