Skip to content

JSON backup errors don't contain an actual error message #4945

@mikix

Description

@mikix

Output of restic version

restic 0.16.4 compiled with go1.22.2 on linux/amd64

What backend/service did you use to store the repository?

Local

Problem description / Steps to reproduce

Backup errors printed to the console with --json have no error message. They look like:

{"message_type": "error", "error": {}, ...}

Expected behavior

An error message that could be displayed to a user should be in the JSON blob.

Do you have any idea what may have caused this?

Go's json encoder can't marshal error interfaces - restic should grab the error string with .Error()

I'm planning on fixing this - I have a patch. Just filing this for tracking purposes.

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