\domain_access_confirm_fields() hides all possible exception messages

Created on 30 January 2024, 5 months ago

Drupal Version

10.x

Domain module version

2.0.0-beta1

Expected Behavior

Failures and exceptions are shown appropriately.

I have a few ideas so far:

  1. No longer catch the exception, and let it break things so users and module maintainers can fix whatever the underlying problem is.
  2. Only catch a specific named exception (say FieldException), and document in code comments why we skip past it.
  3. If we must catch all exceptions, improve the error message to include the field name, exception type, exception message, and why we are continuing on.

Actual Behavior

We noticed that when running drush site:install --existing-config that a notice of Field installation failed. was being logged. This was confusing because why would a field fail to install, and more so why was it a notice? The error message also doesn't easily show in drush what module or even field name is failing.

Steps to reproduce

I'm about to file a related issue in domain_menu_access, where the root of the error was caused. But, you can trigger this with:

$ drush -y site:install minimal && \
    drush -y en domain_menu_access && \
    drush -y config:export && \
    drush -y site:install --existing-config
πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada deviantintegral

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

Comments & Activities

Production build 0.69.0 2024