Moved getLastError to JsMessage