Skip to content

Change HTTP status code from 200 to 201 on object creation#881

Draft
CalRL wants to merge 1 commit intosupabase:masterfrom
CalRL:patch-1
Draft

Change HTTP status code from 200 to 201 on object creation#881
CalRL wants to merge 1 commit intosupabase:masterfrom
CalRL:patch-1

Conversation

@CalRL
Copy link

@CalRL CalRL commented Mar 1, 2026

A bit pedantic, however while I was making a small wrapper in rust i mistakenly matched for 201 status code, to me it's just intuitive for this to return 201

What kind of change does this PR introduce?

HTTP Status Code response change

What is the current behavior?

Currently on object creation, 200 is returned, http spec indicated that 201 should be used when a resource is created and or returned

What is the new behavior?

Returns 201 CREATED instead

Additional context

kindof a nothing burger pr but i was scratching my head for a second while making my rust wrapper, checking for 201 after uploading an image

A bit pedantic, however while I was making a small wrapper in rust i mistakenly matched for 201 status code, to me it's just intuitive for this to return 201
@CalRL CalRL requested a review from a team as a code owner March 1, 2026 16:33
@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Cache: Disabled due to Reviews > Disable Cache setting

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between da8209a and e925eda.

📒 Files selected for processing (1)
  • src/http/routes/object/createObject.ts

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the default HTTP status code for object creation operations to properly reflect successful resource creation.

Walkthrough

The default HTTP status code for object creation responses has been updated. When objectMetadata.httpStatusCode is undefined, the response now uses HTTP status 201 instead of 200. This affects the createObject route handler in a single-line modification with no changes to the control flow or exported API surface.

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CalRL CalRL marked this pull request as draft March 1, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant