Skip to content

Commit

Permalink
Revert using ErrorWithCause & just include message
Browse files Browse the repository at this point in the history
  • Loading branch information
pokutuna committed Jun 6, 2023
1 parent 70338e0 commit 9a61314
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ ts_library(
srcs = glob(["**/*.ts"]),
deps = [
"//api",
"//common/errors",
"//core",
"//protos:ts",
"//sqlx",
Expand Down
3 changes: 1 addition & 2 deletions cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
} from "df/cli/credentials";
import { actuallyResolve, assertPathExists, compiledGraphHasErrors } from "df/cli/util";
import { createYargsCli, INamedOption } from "df/cli/yargswrapper";
import { ErrorWithCause } from "df/common/errors/errors";
import { supportsCancel, WarehouseType } from "df/core/adapters";
import { targetAsReadableString } from "df/core/targets";
import { dataform } from "df/protos/ts";
Expand Down Expand Up @@ -731,7 +730,7 @@ export function runCli() {
const projectConfig = JSON.parse(dataformJson);
warehouse = projectConfig.warehouse;
} catch (e) {
throw new ErrorWithCause(`Could not parse dataform.json: ${e.message}`, e);
throw new Error(`Could not parse dataform.json: ${e.message}`);
}
if (!dbadapters.validWarehouses.includes(warehouse)) {
throw new Error("Unrecognized 'warehouse' setting in dataform.json");
Expand Down

0 comments on commit 9a61314

Please sign in to comment.