{"record":{"id":"6b6ab543e7bc6f91","repo":"instructure/canvas-lms","slug":"no-config-check","errorCode":null,"errorMessage":"No config check","messagePattern":"No config check","errorType":"exception","errorClass":"GoogleDrive::ConnectionException","httpStatus":null,"severity":"warning","filePath":"gems/google_drive/lib/google_drive/connection.rb","lineNumber":107,"sourceCode":"          email_address: user_id,\n          type: \"user\",\n          role: \"writer\"\n        )\n        drive.create_permission(normalize_document_id(document_id), new_permission)\n      rescue Google::Apis::Error => e\n        raise ConnectionException, exception_message(e)\n      end\n    end\n\n    def authorized?\n      drive.get_about(fields: \"user\")\n      true\n    rescue ConnectionException, NoTokenError, Google::Apis::Error\n      false\n    end\n\n    def self.config_check(_settings)\n      raise ConnectionException(\"No config check\")\n    end\n\n    def self.config=(config)\n      unless config.is_a?(Proc)\n        raise \"Config must be a Proc\"\n      end\n\n      @config = config\n    end\n\n    def self.config\n      @config.call\n    end\n\n    private\n\n    def exception_message(exception)\n      return \"Google Drive connection timed out\" if exception.cause.is_a?(Faraday::TimeoutError)","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/instructure/canvas-lms/blob/1c9f0bb8013ed69c4f2efe11fd483025469b7e6c/gems/google_drive/lib/google_drive/connection.rb#L89-L125","documentation":"GoogleDrive::Connection.config_check is the interface every external tool config must implement to validate settings; the Google Drive integration does not implement a real check and unconditionally raises ConnectionException. Note the source also has a latent bug: `ConnectionException(\"No config check\")` calls the class as a method rather than `raise`, so the literal raise is what surfaces here. Callers should treat 'no config check' as unsupported, not as a broken config.","triggerScenarios":"Account/Canvas settings code invoking GoogleDrive::Connection.config_check(settings) to validate a Google Drive plugin configuration.","commonSituations":"Admin saving Google Drive plugin settings and Canvas running validation; generic tool-config validation loops that iterate all registered integrations.","solutions":["Do not treat this raise as a config failure — catch ConnectionException for this integration and consider the config valid/unchecked","Avoid calling config_check for GoogleDrive; there is no supported validation","Patch locally to `return true` if you need config_check to succeed"],"exampleFix":"// before\nvalid = GoogleDrive::Connection.config_check(settings)\n// after\nbegin\n  valid = GoogleDrive::Connection.config_check(settings)\nrescue ConnectionException\n  valid = true # google drive provides no config check\nend","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"begin\n  GoogleDrive::Connection.config_check(settings)\nrescue ConnectionException\n  # no-op: integration defines no config check\nend","preventionTips":["Only call config_check on integrations that implement it","Treat 'No config check' as unsupported, not invalid","Rescue around generic per-plugin validation loops"],"tags":["google-drive","unimplemented","validation"],"backgroundTag":"method-not-implemented","analyzedSha":"1c9f0bb8013ed69c4f2efe11fd483025469b7e6c","analyzedAt":"2026-09-15T20:33:18.891Z","contentChangedAt":"2026-09-15T20:33:18.891Z","schemaVersion":2},"datasetVersion":"2026-09-23T02:17:17.105Z"}