Skip to content

Change behavior of Service API Responses on Empty Sets #1247

@weberjm

Description

@weberjm

Currently, the Framework Services will generally respond to any request which results in an empty set with a 404: Not Found error. This can happen when:

  • There have been no records created of this object
  • The user does not have ownership/permissions to view any records

To more closely align with REST specifications, this behavior should be changed. The 404 response should be reserved for when a resource does not exist:

  • For individual objects, like "/flows/{id}," when that object does not exist, or the user does not have permissions to view the record, the 404 is correct (or we can debate in which cases we might want to respond with a 403 response)
  • For requests that respond with lists, like "/flows", it should only respond 404 if the endpoint does not exist, like calling "/integrations" For responses where no records match the criteria or permissions, it should respond with 200 and an empty list.

Metadata

Metadata

Labels

APIenhancementNew feature or requestgeneralaffects multiple services or domains

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions