Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error message when loading a non-manifest #4091

Open
mk-pmb opened this issue Feb 3, 2025 · 2 comments
Open

Better error message when loading a non-manifest #4091

mk-pmb opened this issue Feb 3, 2025 · 2 comments
Labels
annotations annotation display / viewing

Comments

@mk-pmb
Copy link

mk-pmb commented Feb 3, 2025

Manifest URLs: (Edit: None.)

I accidentially gave an AnnotationPage as the manifest URL. The error message was just "TypeError: n is null", which had me confused for a few minutes.

Can we get a better error message for when the thing at the manifest URL is not a manifest?

@mk-pmb mk-pmb added the annotations annotation display / viewing label Feb 3, 2025
@mk-pmb mk-pmb changed the title TypeError: n is null Better error message when loading a non-manifest Feb 3, 2025
@lutzhelm
Copy link
Contributor

lutzhelm commented Feb 3, 2025

PR #3927 already addresses handling the JavaScript error itself. It would currently show the following already existing error message:

The resource cannot be added: https://gist.githubusercontent.com/mk-pmb/4b73909b15a501344675240221eb2f05/raw/1ff0564fd1c52783eb34bb19cca3012b27ce6656/mirador-null.iiif3.json

Would this be sufficient for you? Announcing the specific cause of the error (not a manifest or collection; manifest / collection has errors; parser handles iiif resource wrong etc.) might prove difficult.

@mk-pmb
Copy link
Author

mk-pmb commented Feb 3, 2025

I think I still wouldn't have understood my mistake immediately. Can we maybe report whether the @context and type had their expected values? Then it could say something like

The resource cannot be added: [… URL …] The @context field was understood. The type field was unsupported (expected "Manifest").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
annotations annotation display / viewing
Projects
None yet
Development

No branches or pull requests

2 participants