Skip to content

Commit

Permalink
add converting enum to string in the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kolina committed Feb 14, 2023
1 parent 7b378cf commit 2f9cb2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/adapters/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as semver from "semver";

import { IAdapter } from "df/core/adapters";
import { Task, Tasks } from "df/core/tasks";
import { tableTypeFromProto } from "df/core/utils"
import { tableTypeFromProto, tableEnumTypeToString } from "df/core/utils"
import { dataform } from "df/protos/ts";

export abstract class Adapter implements IAdapter {
Expand Down Expand Up @@ -43,7 +43,7 @@ export abstract class Adapter implements IAdapter {
case dataform.TableType.VIEW:
return dataform.TableMetadata.Type.VIEW;
default:
throw new Error(`Unexpected table type: ${enumType}`);
throw new Error(`Unexpected table type: ${tableEnumTypeToString(enumType)}`);
}
}

Expand Down

0 comments on commit 2f9cb2f

Please sign in to comment.