Exception: Dependabot::MisconfiguredTooling

Inherits:
DependabotError show all
Extended by:
T::Sig
Defined in:
lib/dependabot/errors.rb

Overview

File level errors #

Constant Summary

Constants inherited from DependabotError

DependabotError::BASIC_AUTH_REGEX, DependabotError::FURY_IO_PATH_REGEX

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tool_name, tool_message) ⇒ MisconfiguredTooling

Returns a new instance of MisconfiguredTooling.



581
582
583
584
585
586
587
588
589
590
591
# File 'lib/dependabot/errors.rb', line 581

def initialize(tool_name, tool_message)
  @tool_name = tool_name
  # Sanitize here as well as via `super`: the raw `tool_message` attribute is read
  # directly during error serialization (see `updater_error_details`), so it must not
  # carry credentials (e.g. basic-auth URLs) that the base message sanitization strips.
  @tool_message = T.let(filter_sensitive_data(tool_message), String)

  msg = "Dependabot detected that #{tool_name} is misconfigured in this repository. " \
        "Running `#{tool_name.downcase}` results in the following error: #{tool_message}"
  super(msg)
end

Instance Attribute Details

#tool_messageObject (readonly)

Returns the value of attribute tool_message.



573
574
575
# File 'lib/dependabot/errors.rb', line 573

def tool_message
  @tool_message
end

#tool_nameObject (readonly)

Returns the value of attribute tool_name.



570
571
572
# File 'lib/dependabot/errors.rb', line 570

def tool_name
  @tool_name
end