planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

POST Note Endpoint 404 vs 400 #1209

Closed HubbardHarvey3 closed 1 month ago

HubbardHarvey3 commented 1 month ago

Affected Product Which product does this bug affect? People

Describe the bug Using the endpoint POST /people/v2/people//notes to create a new note.
Initially, I was getting a 404 error detail: The resource you requested could not be found. After some troubleshooting, I determined I was missing a required attribute parameter note_category_id. My question is, if the note_category_id attribute is missing or blank should the error instead be 400 A required parameter wasn't supplied? Issue #1128 looks related, but doesn't mention if 404 is expected or not.

To Reproduce Send a POST payload to /people/v2/people//notes with the following attributes:

"data": {
        "type": "Note",
        "attributes": {
            "note": "Test note from the api",
            "note_category_id": "" // Or missing completely
        }
    }

Expected behavior Should return a 400 error The resource you requested could not be found

Screenshot of actual behavior image

Additional Context:

I have..

zanebliss commented 1 month ago

Hey @HubbardHarvey3,

Thanks for bringing this to our attention. I understand this isn't the ideal response code or message in the scenario you're describing. I'll relay this to our team. I'm going to close this issue, but if you need any other help or run into any other issues, let us know.

Thanks, Zane