SettingsForm Error handling and API exception handling.

Created on 19 June 2025, 2 months ago

Problem/Motivation

When Acquia Optimize configured in the Drupal module and a user fills out the form with random values, on submit the user see an error message. We should log the error and handle the user facing message to be more user friendly.

Steps to reproduce

Configure the Acquia Optimize with random values instead of actual token and URL.

Proposed resolution

  1. The validate method is currently missing; it is necessary to incorporate this method into SettingsForm.php and ensure that error handling is properly implemented.
  2. Additionally, the exception handling for the API response status code in ApiClient needs to be corrected.
  3. It is recommended to rename testApi to a more conventional method name, such as validateApiConnection, and update all references where this method is invoked.

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

1.1

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @ankitv18
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18
  • Pipeline finished with Failed
    2 months ago
    Total: 344s
    #529319
  • Pipeline finished with Success
    2 months ago
    Total: 179s
    #530031
  • Pipeline finished with Success
    2 months ago
    Total: 167s
    #530042
  • Pipeline finished with Success
    2 months ago
    Total: 154s
    #530044
  • Pipeline finished with Success
    2 months ago
    Total: 156s
    #530048
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia ankitv18
  • Pipeline finished with Success
    2 months ago
    Total: 188s
    #530056
  • Pipeline finished with Success
    about 2 months ago
    Total: 329s
    #531099
  • Pipeline finished with Failed
    about 2 months ago
    Total: 149s
    #531485
  • Pipeline finished with Success
    about 2 months ago
    Total: 254s
    #531905
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 134s
    #531982
  • Pipeline finished with Failed
    about 2 months ago
    Total: 161s
    #531983
  • Pipeline finished with Success
    about 2 months ago
    Total: 149s
    #532017
  • Pipeline finished with Success
    about 2 months ago
    Total: 185s
    #532035
  • Pipeline finished with Success
    about 2 months ago
    Total: 169s
    #532043
  • Pipeline finished with Success
    about 2 months ago
    Total: 146s
    #532230
  • Pipeline finished with Failed
    about 2 months ago
    Total: 223s
    #533189
  • Pipeline finished with Failed
    about 2 months ago
    Total: 157s
    #533193
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 91s
    #533212
  • Pipeline finished with Failed
    about 2 months ago
    Total: 187s
    #533213
  • Pipeline finished with Failed
    about 2 months ago
    Total: 213s
    #533217
  • Pipeline finished with Success
    about 2 months ago
    Total: 152s
    #533238
  • Pipeline finished with Success
    about 2 months ago
    Total: 163s
    #533245
  • Pipeline finished with Success
    about 2 months ago
    Total: 201s
    #533284
  • Pipeline finished with Success
    about 2 months ago
    Total: 172s
    #533296
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia vishalkhode

    vishalkhode โ†’ made their first commit to this issueโ€™s fork.

  • Pipeline finished with Success
    about 2 months ago
    Total: 155s
    #534874
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 130s
    #534895
  • Pipeline finished with Success
    about 2 months ago
    Total: 183s
    #534897
  • Pipeline finished with Success
    about 2 months ago
    Total: 196s
    #534916
  • Pipeline finished with Skipped
    about 2 months ago
    #535002
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024