Skip to content

Address PR review feedback from SDK migration - #73

Merged
jeremy merged 1 commit into
mainfrom
fix-pr-review-feedback
Jan 26, 2026
Merged

Address PR review feedback from SDK migration#73
jeremy merged 1 commit into
mainfrom
fix-pr-review-feedback

Conversation

@jeremy

@jeremy jeremy commented Jan 26, 2026

Copy link
Copy Markdown
Member

Fixes for Codex review comments:

  1. webhooks.go: Let server use default webhook types instead of hard-coding
    (PR Migrate webhooks.go to use SDK WebhooksService #58 feedback)

  2. templates.go: Use raw API for archived/trashed status since SDK List()
    only returns active templates (PR Migrate templates.go to use SDK TemplatesService #60 feedback)

  3. campfire.go: Validate ParseInt errors before DeleteLine to avoid
    silent 0 IDs (PR Migrate campfire.go to use SDK CampfiresService #64 feedback)

  4. recordings.go: Add comment clarifying that Unarchive() works for both
    archived AND trashed recordings via status/active endpoint (PR Migrate recordings.go to use SDK RecordingsService #68)

  5. files.go: Preserve SDK errors in auto-detect mode instead of masking
    auth/permission errors as "not found" (PR Migrate files.go to use SDK VaultsService #70 feedback)

Fixes for Codex review comments:

1. webhooks.go: Let server use default webhook types instead of hard-coding
   (PR #58 feedback)

2. templates.go: Use raw API for archived/trashed status since SDK List()
   only returns active templates (PR #60 feedback)

3. campfire.go: Validate ParseInt errors before DeleteLine to avoid
   silent 0 IDs (PR #64 feedback)

4. recordings.go: Add comment clarifying that Unarchive() works for both
   archived AND trashed recordings via status/active endpoint (PR #68)

5. files.go: Preserve SDK errors in auto-detect mode instead of masking
   auth/permission errors as "not found" (PR #70 feedback)
@jeremy
jeremy merged commit d498481 into main Jan 26, 2026
8 checks passed
@jeremy
jeremy deleted the fix-pr-review-feedback branch January 26, 2026 02:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 56438fec96

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +710 to +715
// If all probes failed, check if first error was 404 or something else
if result == nil && firstErr != nil {
sdkErr := basecamp.AsError(firstErr)
if sdkErr.Code != basecamp.CodeNotFound {
// Return actual error (auth, permission, network, etc.)
return convertSDKError(firstErr)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Surface non-404 errors from later probes

When auto-detecting the item type, only the first probe's error is checked; if the vault probe returns 404 but a later upload/document probe returns 403/401/500 (e.g., item is an upload but the user lacks upload permissions), the code still falls through to ErrNotFound and masks the real failure. This defeats the stated goal of preserving auth/permission/network errors whenever a later probe is the one that actually fails.

Useful? React with 👍 / 👎.

Comment on lines +914 to +918
// All probes failed - check if first error was 404 or something else
sdkErr := basecamp.AsError(firstErr)
if sdkErr.Code != basecamp.CodeNotFound {
// Return actual error (auth, permission, network, etc.)
return convertSDKError(firstErr)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Auto-detect update masks later probe errors

The update path has the same issue: only firstErr (from the document probe) is checked. If that probe returns 404 but a later vault/upload probe returns a non-404 error (permission, auth, transient API error), the command still reports "Item not found" instead of surfacing the actual failure. Users who lack access to the specific item type will get a misleading not-found response.

Useful? React with 👍 / 👎.

jeremy added a commit that referenced this pull request Feb 19, 2026
Fixes for Codex review comments:

1. webhooks.go: Let server use default webhook types instead of hard-coding
   (PR #58 feedback)

2. templates.go: Use raw API for archived/trashed status since SDK List()
   only returns active templates (PR #60 feedback)

3. campfire.go: Validate ParseInt errors before DeleteLine to avoid
   silent 0 IDs (PR #64 feedback)

4. recordings.go: Add comment clarifying that Unarchive() works for both
   archived AND trashed recordings via status/active endpoint (PR #68)

5. files.go: Preserve SDK errors in auto-detect mode instead of masking
   auth/permission errors as "not found" (PR #70 feedback)
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