convert errors to string so they actually work as repsonses

This commit is contained in:
Travis Glenn Hansen 2020-12-15 08:25:16 -07:00
parent ccf9791fab
commit f56c75074f
1 changed files with 4 additions and 2 deletions

View File

@ -1806,7 +1806,8 @@ class FreeNASDriver extends ControllerZfsSshBaseDriver {
return versionInfo; return versionInfo;
} }
} catch (e) { } catch (e) {
versionErrors.v2 = e; // if more info is needed use e.stack
versionErrors.v2 = e.toString();
} }
httpClient.setApiVersion(1); httpClient.setApiVersion(1);
@ -1827,7 +1828,8 @@ class FreeNASDriver extends ControllerZfsSshBaseDriver {
return versionInfo; return versionInfo;
} }
} catch (e) { } catch (e) {
versionErrors.v1 = e; // if more info is needed use e.stack
versionErrors.v1 = e.toString();
} }
// throw error if cannot get v1 or v2 data // throw error if cannot get v1 or v2 data