Exception: Dependabot::TypedDependabotError
- Inherits:
-
DependabotError
- Object
- StandardError
- DependabotError
- Dependabot::TypedDependabotError
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/errors.rb
Direct Known Subclasses
Constant Summary
Constants inherited from DependabotError
DependabotError::BASIC_AUTH_REGEX, DependabotError::FURY_IO_PATH_REGEX
Instance Attribute Summary collapse
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
Instance Method Summary collapse
- #detail(hash = nil) ⇒ Object
-
#initialize(error_type, message = nil) ⇒ TypedDependabotError
constructor
A new instance of TypedDependabotError.
Constructor Details
#initialize(error_type, message = nil) ⇒ TypedDependabotError
Returns a new instance of TypedDependabotError.
344 345 346 347 348 |
# File 'lib/dependabot/errors.rb', line 344 def initialize(error_type, = nil) @error_type = T.let(error_type, String) super( || error_type) end |
Instance Attribute Details
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
341 342 343 |
# File 'lib/dependabot/errors.rb', line 341 def error_type @error_type end |
Instance Method Details
#detail(hash = nil) ⇒ Object
351 352 353 354 355 356 357 358 |
# File 'lib/dependabot/errors.rb', line 351 def detail(hash = nil) { "error-type": error_type, "error-detail": hash || { message: } } end |