omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
12.35k stars 623 forks source link

BUG: Failed to delete label #3327

Open omerfarukabaci opened 8 months ago

omerfarukabaci commented 8 months ago

Hello, first I want to thank you for this great project!

I have an issue about deleting a label that I have created. The id of the label is 11982d46-95df-11ee-b11e-d70aa689ff0e. It is being returned in the following request:

POST https://api-prod.omnivore.app/api/graphql

  query GetLabels {
      labels {
        ... on LabelsSuccess {
          labels {
            ...LabelFields
          }
        }
        ... on LabelsError {
          errorCodes
        }
      }
    }

  fragment LabelFields on Label {
    id
    name
    color
    description
    createdAt
  }

But when I try to delete it via the following request POST https://api-prod.omnivore.app/api/graphql

mutation {
  deleteLabel(id: "11982d46-95df-11ee-b11e-d70aa689ff0e") {
    ... on DeleteLabelSuccess {
      label {
        id
        name
        color
        description
        createdAt
      }
    }
    ... on DeleteLabelError {
      errorCodes
    }
  }
}

I got a not found error:

{
  "data": {
    "deleteLabel": {
      "errorCodes": [
        "NOT_FOUND"
      ]
    }
  }
}

I don't know the exact reason, if needed I can provide further information. Again thanks for maintaining this great project! 🚀

jacksonh commented 8 months ago

Hey is there any chance this is one of the system labels, like RSS?

omerfarukabaci commented 8 months ago

Hey @jacksonh, name of the label is "Favorites", I am not sure if that's a system label.

jun6lee commented 6 months ago

I also still have a label I had initially called RSS (before feeds) that I renamed to RSSS to accommodate feeds, which I can't remove.

omerfarukabaci commented 6 months ago

@jacksonh I think you are right, it is a system label:

https://github.com/omnivore-app/omnivore/blob/main/packages/api/src/repository/label.ts#L17