Enhance avatar API error handling and MIME type detection' & 'Refactor avatar API HTTP methods and improve error messages#163
Conversation
…elper for content type determination
…ther it's a network issue, API outage, or actual problem with your request.
… for that endpoint. Removed the "PUT" parameter so it defaults to POST like the AttachAvatar method above it and Cover the web asset extensions that this uploader already sends
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 50 minutes and 3 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR enhances avatar upload and management by introducing public visibility support in the data model, switching avatar operations to PUT with explicit content-type handling, and improving the upload flow with better error messages and completion sequencing. ChangesAvatar upload and API improvements
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
|
To briefly explain what likely happened: rate limits are sometimes shared across an organization or repository, so if other PRs were being reviewed around the same time, it can appear like you hit a limit even on your first PR. When you tagged me on the existing commits while the limit was active, the command was consumed but nothing happened — and then the subsequent tag on the new PR was similarly dropped. I understand that's a poor experience, and I apologize for the confusion it caused. (´• ω •`) 🐰 ✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Editor/Resources/Builder/BuilderWindow.cs`:
- Around line 1334-1342: The code dereferences slot.UserAvatarId inside the
EditorCoroutineUtility.StartCoroutine call (invoking sq.SelectAvatar) without
guarding slot for null; add a null check on slot before calling SelectAvatar and
handle the null case by recording the failure (status.AddStatus and
Debug.LogError) and ensuring callback() is invoked so completion flow always
runs; if slot is non-null, call sq.SelectAvatar as before with
slot.UserAvatarId. Ensure the checks wrap the call to
EditorCoroutineUtility.StartCoroutine and preserve the existing success and
error lambdas.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 15c3921b-2e31-425d-8b20-99bd954a2700
📒 Files selected for processing (3)
Editor/Resources/Builder/BuilderWindow.csEditor/Resources/Builder/SideQuest/SqEditorAppApi.csEditor/Resources/Builder/SideQuest/SqEditorModels.cs
These changes at least fix it so the screenshot of the avatar is uploaded successfully and I see less errors in the logs due to the MimeType
Summary by CodeRabbit
Bug Fixes
New Features