forked from OpenFn/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request OpenFn#1147 from OpenFn/1112-crash-when-setting-up…
…-version-control Crash and wrong error message when setting up version control
- Loading branch information
Showing
13 changed files
with
290 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
defmodule Lightning.VersionControl.GithubError do | ||
@moduledoc """ | ||
Github Error exception | ||
""" | ||
defexception [:code, :message, :meta] | ||
|
||
def new(code, msg, meta) when is_binary(msg) do | ||
%__MODULE__{code: code, message: msg, meta: Map.new(meta)} | ||
end | ||
|
||
def installation_not_found(msg, meta \\ %{}) do | ||
new(:installation_not_found, msg, meta) | ||
end | ||
|
||
def misconfigured(msg, meta \\ %{}) do | ||
new(:misconfigured, msg, meta) | ||
end | ||
|
||
def invalid_certificate(msg, meta \\ %{}) do | ||
new(:invalid_certificate, msg, meta) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.