Skip to content

[Bug] Invalid output when a file observable already exist #2054

Closed
@To-om

Description

@To-om

Request Type

Bug

Work Environment

TheHive 4.1.4

Problem Description

When creating a file observable that already exist the output is:

{
  "success":[],
  "failure":[
    {
      "object":{"data":"file:my_awesome_file.txt","attachment":{"name":" my_awesome_file.txt "}}
     }
  ]
}

It should be:

{
  "success":[],
  "failure":[
    {
      "type":"CreateError",
      "message":"Observable already exists",
      "object":{"data":"file:my_awesome_file.txt","attachment":{"name":" my_awesome_file.txt "}}
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    TheHive4TheHive4 related issuesbug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions