Exception: GitHub::ValidationFailedError Private

Inherits:
Error
  • Object
show all
Defined in:
Library/Homebrew/utils/github.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Error when the API returns a validation error.

Instance Attribute Summary

Attributes inherited from Error

#github_message

Instance Method Summary collapse

Constructor Details

#initialize(github_message, errors) ⇒ ValidationFailedError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ValidationFailedError.


82
83
84
85
86
87
88
89
90
# File 'Library/Homebrew/utils/github.rb', line 82

def initialize(github_message, errors)
  @github_message = if errors.empty?
    github_message
  else
    "#{github_message}: #{errors}"
  end

  super(@github_message)
end