Skip to content

Consider dealing with invalid artifact metadata #740

Open
@lread

Description

@lread

Sentry Logs

I've been looking into what exceptions are thrown when folks use the cljdoc website.

Currently

After cljdoc finds an artifact in a maven repo, it can consult its metadata.
This metadata can be invalid.
When this occurs, cljdoc will return a 500 error.

For example: https://cljdoc.org/d/lein-droid/lein-droid/0.4.0-SNAPSHOT

Option 1: do nothing

This is pretty rare, maybe we should just leave it.

Option 2: continue with 500 but add an explanation

Although we know invalid artifact metadata exists, it still is unexpected.
Adding some explanation to the 500 responses would be helpful.
This would mean enriching our current 500 responses from:

An exception occurred, sorry about that!

To something more like our formatted 404 response.
Might tackle #32 first?

Option 3: return a 404

Extend the concept of 404 to mean no valid artifact found.
This would fit into our existing 404 error handling.

I'm thinking...

Option 2 seems thoughtful.
And would force some movement on #32, which would also be good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions