Issue #3476940: Avoid crashing the AI settings page if the default provider is not fully configured
1 unresolved thread
Closes #3476940
Merge request reports
Activity
Filter activity
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(); $this->keyRepository->getKey($this->getConfig()->get('api_key'))
returns null and triggers a nullpointer exception if theapi_key
is empty.So moved all the logic up into the base provider client.
Edited by codebymikey
Thank you @codebymikey - DRY! looks good. Getting merged in dev.
Please register or sign in to reply