Skip to content

Commit

Permalink
better error
Browse files Browse the repository at this point in the history
  • Loading branch information
timothysmith0609 committed Nov 26, 2018
1 parent c8d51d5 commit 3c9cae8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def validate_params(params)
params[:failure_queries].each do |query|
JsonPath.new(query[:path])
JsonPath.new(query[:error_msg_path]) if query[:error_msg_path]
raise RuntimeError if query[:custom_error_msg] && !query[:custom_error_msg].is_a?(String)
if query[:custom_error_msg] && !query[:custom_error_msg].is_a?(String)
raise RuntimeError, "custom_error_msg must be a string, but found #{query[:custom_error_msg]}"
end
end
rescue RuntimeError => e
raise FatalDeploymentError, "error parsing JsonPath expression for custom resource params: #{e.message}"
Expand Down

0 comments on commit 3c9cae8

Please sign in to comment.