Skip to content

Improve manifest import error handling and diagnostics#571

Open
cubap wants to merge 1 commit into
mainfrom
567-manifest-import
Open

Improve manifest import error handling and diagnostics#571
cubap wants to merge 1 commit into
mainfrom
567-manifest-import

Conversation

@cubap

@cubap cubap commented Jun 15, 2026

Copy link
Copy Markdown
Member

Problem

Users reported an "unusual manifest import error" when importing certain IIIF manifests. The error message was opaque and didn't indicate which manifest failed or why.

What This PR Does (Client-Side)

Improves error handling and diagnostics in the manifest import component:

  • Structured console logging — Each import attempt logs [ManifestImport] prefixed messages for start, success, and failure
  • Richer error objects — Error objects now carry manifestUrl, responseStatus, and errorDetails for debugging
  • Better error display UI — Failed imports show a cleaner layout with icon, error message, and truncated URL
  • Server error detail logging — When the server returns a JSON error response, the full object is logged to console

Root Cause (Server-Side)

Investigation revealed the actual import failure originates in TPEN-services, not the frontend. The server's validatePayload.js rejects valid IIIF manifests when metadata uses language tags other than "none" (e.g., "en", "fr").

Server-side fix tracked in: CenterForDigitalHumanities/TPEN-services#530

Notes

This PR improves the client-side experience (better error visibility and debugging) but does not fix the underlying server-side validation bug. The server fix in TPEN-services#530 will resolve the actual import failures.

- Add structured console logging for each import attempt
- Include manifestUrl and responseStatus in error objects
- Improve error display UI with better layout and truncated URLs
- Log server error details for debugging
@cubap cubap added the enhancement New feature or request label Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@cubap

cubap commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

This adds some console.logs that are a little messy and debuggy, but is also how we do things right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant