Skip to content
Snippets Groups Projects

Issue #3476940: Avoid crashing the AI settings page if the default provider is not fully configured

Merged Issue #3476940: Avoid crashing the AI settings page if the default provider is not fully configured
1 unresolved thread
Merged codebymikey requested to merge issue/ai-3476940:3476940-avoid-crashing-settings-page into 1.0.x
1 unresolved thread

Closes #3476940

Merge request reports

Code Quality is loading
Test summary results are being parsed

Merged by Marcus JohanssonMarcus Johansson 4 months ago (Sep 26, 2024 12:15pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
245 245 }
246 246 }
247 247
248 /**
249 * Load API key from key module.
250 *
251 * @return string
252 * The API key.
253 */
254 protected function loadApiKey(): string {
255 return $this->keyRepository->getKey($this->getConfig()->get('api_key'))->getKeyValue();
  • Author Contributor

    $this->keyRepository->getKey($this->getConfig()->get('api_key')) returns null and triggers a nullpointer exception if the api_key is empty.

    So moved all the logic up into the base provider client.

    Edited by codebymikey
  • Please register or sign in to reply
  • codebymikey added 1 commit

    added 1 commit

    • 53406382 - Issue #3476940: Avoid crashing the AI settings page if the default provider is not fully configured

    Compare with previous version

  • codebymikey added 1 commit

    added 1 commit

    • 5d1288ec - Issue #3476940: Avoid crashing the AI settings page if the default provider is not fully configured

    Compare with previous version

  • Thank you @codebymikey - DRY! looks good. Getting merged in dev.

  • Marcus Johansson approved this merge request

    approved this merge request

  • Please register or sign in to reply
    Loading