Skip to content

Migrate files.go to use SDK VaultsService - #70

Merged
jeremy merged 1 commit into
mainfrom
sdk-files
Jan 26, 2026
Merged

Migrate files.go to use SDK VaultsService#70
jeremy merged 1 commit into
mainfrom
sdk-files

Conversation

@jeremy

@jeremy jeremy commented Jan 26, 2026

Copy link
Copy Markdown
Member

No description provided.

@jeremy
jeremy force-pushed the sdk-files branch 2 times, most recently from 8b3c6d7 to f543e81 Compare January 26, 2026 02:23

@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: 8b3c6d76af

ℹ️ 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 +741 to +742
if result == nil {
return output.ErrNotFound("item", itemIDStr)

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 Preserve SDK lookup errors in auto-detect

When --type is omitted, any SDK error during the vault/upload/document probes is ignored and the command falls through to ErrNotFound. That turns authentication failures, permission errors, or transient network issues into a misleading “item not found” response (previously the API error was returned). Consider returning convertSDKError for non-404s (or keeping the first error) instead of unconditionally emitting not-found here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in PR #73 - now tracks first error and checks if it was a 404 or something else. Non-404 errors (auth, permission, network) are returned instead of masking as 'not found'.

Comment on lines 895 to 897
return output.ErrUsageHint(
fmt.Sprintf("Item %s not found", itemID),
fmt.Sprintf("Item %s not found", itemIDStr),
"Specify --type if needed",

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 Don’t mask SDK probe errors in update auto-detect

In the auto-detect branch for updates, any error from the SDK Get probes is treated as a miss and eventually converted into Item not found. This masks real failures like expired tokens, permission denials, or 5xx responses and makes the CLI report the wrong root cause. It would be safer to return convertSDKError for non-404 errors (or propagate the first error) instead of always returning a not-found usage hint.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in PR #73 - same fix applied to update auto-detect path. Non-404 errors are now properly returned.

@jeremy
jeremy merged commit 5f16b0a into main Jan 26, 2026
8 checks passed
@jeremy
jeremy deleted the sdk-files branch January 26, 2026 02:32
jeremy added a commit that referenced this pull request Jan 26, 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)
jeremy added a commit that referenced this pull request Jan 26, 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)
jeremy added a commit that referenced this pull request Feb 19, 2026
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