Feat: Make the js check for health (#1543)

* Feat: Make the js check for health

* chore: Add in the migration types

* feat: type up the migration
This commit is contained in:
J M
2022-06-16 11:58:55 -06:00
committed by GitHub
parent 75a2b2d2ab
commit 27bc493884
3 changed files with 81 additions and 45 deletions

View File

@@ -35,13 +35,29 @@ pub struct JsCode(String);
#[derive(Debug, Clone, Copy)]
pub enum JsError {
Unknown = 1,
Javascript = 2,
Engine = 3,
BoundryLayerSerDe = 4,
Tokio = 5,
FileSystem = 6,
Timeout = 143,
Unknown,
Javascript,
Engine,
BoundryLayerSerDe,
Tokio,
FileSystem,
Code(i32),
Timeout,
}
impl JsError {
pub fn as_code_num(&self) -> i32 {
match self {
JsError::Unknown => 1,
JsError::Javascript => 2,
JsError::Engine => 3,
JsError::BoundryLayerSerDe => 4,
JsError::Tokio => 5,
JsError::FileSystem => 6,
JsError::Code(code) => *code,
JsError::Timeout => 143,
}
}
}
#[cfg(target_arch = "x86_64")]