Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Snapctl task create needs more detailed error message from malformed input files #1137

@ssorsa

Description

@ssorsa

When user creates a task in snapctl: "snapctl task create -t task.json" and the input format is malformed the error message that the user is given for some errors is:

Using task manifest to create task
Error parsing JSON file input - json: cannot unmarshal string into Go value of type map[string]interface {}

Even a line number would be useful in this situation. Now the user needs to figure out the correct line where the error lies. In namespace error the message is:

Error creating task:Invalid namespace: intel/proc

When the user is missing the first "/". This line gives more information for correcting the issue compared to the "Error parsing JSON file input - json: cannot unmarshal string into Go value of type map[string]interface {}".

I'm asking if the line number from malformed input file would be added to the error message.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions