Skip to content

🐛 500 on restore endpoint #2127

@AntoLC

Description

@AntoLC

Bug Report

Request URL https://docs.numerique.gouv.fr/api/v1.0/documents/9e497127-da59-461f-85d5-02b5e439c8d4/restore/
Request Method POST
Status Code 500 Internal Server Error

How to reproduce

  • Create a doc
  • Create a subdoc
  • Open a new tab and go to the subdoc
  • Delete the parent
  • The subdoc has the Restore button available, to click on it give a 500 error

Demo

Image

Possible solution

This endpoint should maybe not give a 200, because if the parent is deleted, it does not make sense to restore the child.

It highlight as well that we will need a flag to know frontside if the user is on a restorable doc or not.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions