Skip to content

Commit 66b7bce

Browse files
committed
db profile not found error message
1 parent 481b68d commit 66b7bce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/com/alhuelamo/databricks/jobmanager/conf/DatabricksWorkspace.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ object DatabricksWorkspace {
1515
}
1616

1717
def apply(profile: String, ini: Ini): DatabricksWorkspace = {
18-
val section = ini.get(profile)
18+
val section = Option(ini.get(profile))
19+
.getOrElse(throw new IllegalStateException(s"Profile '$profile' not found!"))
20+
1921
DatabricksWorkspace(
2022
host = section.get("host"),
2123
token = section.get("token")

0 commit comments

Comments
 (0)