Shouldn't this return a `JsError` as well?