planningcenter / developers

Planning Center API docs and support

Home Page:https://developer.planning.center/docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POST Note Endpoint 404 vs 400

HubbardHarvey3 opened this issue · comments

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:

  • Endpoint: /people/v2/people//notes
  • Language: Go
  • Authentication: Personal Access Token

I have..

  • Reviewed the documentation found at https://developer.planning.center/docs
  • Searched for previous issues reporting this bug
  • Removed all private information from this issue (credentials, tokens, emails, phone numbers, etc.)
  • Reviewed my issue for completeness

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