Skip to content

Bug in logic for handling error messages when entity IDs are missing in Item POST endpoint #612

@VKTB

Description

@VKTB

Sending the following request:

curl -X 'POST' \
  'http://localhost:8000/v1/items' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "catalogue_item_id": "string",
  "system_id": "string",
  "is_defective": true,
  "usage_status_id": "string"
}'

returns:

{
  "detail": "The specified system does not exist"
}

even though the checks for the catalogue_item_id and usage_status_id happen before the system_id check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions