AmericaSCORESBayArea / AmericaSCORESBayArea/salesforce-data-api

DEL /enrollments - 'Enrollment/s Not Found' is missing

Open
#208 0 comments 0 reactions 1 assignee Assigned to @TharunKumarReddyPolu View on GitHub
enhancement good first issue
Dominant language
DataWeave
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Description:**

The `DEL /enrollments` method currently returns `Enrollment/s deleted successfully` even when no records are found.

**Expected Behavior**:

When no records are found, the API should return a 404 status code with the following response body:

```raml
404:
body:
application/json:
example:
message: Enrollment/s Not Found
````

When some enrollments are found and deleted while others are not found, the API should return a 206 status code with the following response body:

```json
{
"message": "Partial Success",
"deleted": ["enrollment_id_1", "enrollment_id_2"],
"not_found": ["enrollment_id_3", "enrollment_id_4"]
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.