SettingsForm Error handling and API exception handling.

Created on 19 June 2025, 13 days 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
  • Merge request !10Resolve #3530919 "Error exception handling" → (Merged) created by ankitv18
  • Pipeline finished with Failed
    9 days ago
    Total: 344s
    #529319
  • Pipeline finished with Success
    8 days ago
    Total: 179s
    #530031
  • Pipeline finished with Success
    8 days ago
    Total: 167s
    #530042
  • Pipeline finished with Success
    8 days ago
    Total: 154s
    #530044
  • Pipeline finished with Success
    8 days ago
    Total: 156s
    #530048
  • Pipeline finished with Success
    8 days ago
    Total: 188s
    #530056
  • Pipeline finished with Success
    7 days ago
    Total: 329s
    #531099
  • Pipeline finished with Failed
    6 days ago
    Total: 149s
    #531485
  • Pipeline finished with Success
    6 days ago
    Total: 254s
    #531905
  • Pipeline finished with Canceled
    6 days ago
    Total: 134s
    #531982
  • Pipeline finished with Failed
    6 days ago
    Total: 161s
    #531983
  • Pipeline finished with Success
    6 days ago
    Total: 149s
    #532017
  • Pipeline finished with Success
    6 days ago
    Total: 185s
    #532035
  • Pipeline finished with Success
    6 days ago
    Total: 169s
    #532043
  • Pipeline finished with Success
    6 days ago
    Total: 146s
    #532230
  • Pipeline finished with Failed
    5 days ago
    Total: 223s
    #533189
  • Pipeline finished with Failed
    5 days ago
    Total: 157s
    #533193
  • Pipeline finished with Canceled
    5 days ago
    Total: 91s
    #533212
  • Pipeline finished with Failed
    5 days ago
    Total: 187s
    #533213
  • Pipeline finished with Failed
    5 days ago
    Total: 213s
    #533217
  • Pipeline finished with Success
    5 days ago
    Total: 152s
    #533238
  • Pipeline finished with Success
    5 days ago
    Total: 163s
    #533245
  • Pipeline finished with Success
    5 days ago
    Total: 201s
    #533284
  • Pipeline finished with Success
    5 days ago
    Total: 172s
    #533296
  • 🇮🇳India vishalkhode

    vishalkhode made their first commit to this issue’s fork.

  • Pipeline finished with Success
    2 days ago
    Total: 155s
    #534874
  • Pipeline finished with Canceled
    2 days ago
    Total: 130s
    #534895
  • Pipeline finished with Success
    2 days ago
    Total: 183s
    #534897
  • Pipeline finished with Success
    2 days ago
    Total: 196s
    #534916
  • Pipeline finished with Skipped
    2 days ago
    #535002
Production build 0.71.5 2024