Skip to content

Handle the case where package meta has missing fields. #3

Description

@kasipavankumar

Issue

When there are fields missing from the package meta that is provided during package publish flow, API currently throws 500 error, which ideally should be gracefully handled.

Point of error

const { name, version, dependencies, author } = packageMeta

Solution

We should catch & respond to this issue while executing the process-package-meta middleware. This would cause an early exit from the flow & also prevent the uploading of the package to the repository.

const jsonParsedMeta = JSON.parse(packageMeta?.buffer?.toString())

Activity

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

Metadata

Metadata

Labels

❓ QuestionFurther information is requested🐛 BugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions