Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4217

DSpace 7 - PatchBadRequestException - Making this more generic for more usage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Code Review Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 7.0
    • Fix Version/s: None
    • Component/s: REST API v7
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Needed

      Description

      There is a class called PatchBadRequestException currently within DSpace 7 which seemed to be specifically made for the cases where a Patch would cause a BadRequestException. However there's no Patch specific logic within this class, so it would be a quick win to refactor this name to a more generic one so that it can be reused in several other places without the need for making a new Exception class to cover any other BadRequestException cases.

      Currently any instance of 'Throw new BadRequestException' fails to give a proper status code. It currently provides a 500 status code whereas a 400 status code would be expected. I would like to re-use this above mentioned class to properly handle this type of BadRequestException when the code it's being discovered in isn't specific to a Patch.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              raf.ponsaerts-atmire Raf Ponsaerts (Atmire)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: