Skip to content

Log proxy errors#519

Merged
ngundotra merged 1 commit intomasterfrom
log-proxy-errors
Mar 31, 2025
Merged

Log proxy errors#519
ngundotra merged 1 commit intomasterfrom
log-proxy-errors

Conversation

@ngundotra
Copy link
Copy Markdown
Contributor

@ngundotra ngundotra commented Mar 31, 2025

Description

Add logging to proxy endpoint to see where error occurs when fetching ipfs urls on vercel backend

Type of change

  • Bug fix
  • New feature
  • Protocol integration
  • Documentation update
  • Other (please describe): logging for bug fix

Important

Add logging to proxy endpoint in route.ts to diagnose errors when fetching IPFS URLs, and fix indentation in ip.ts.

  • Logging:
    • Add console.error for unsupported protocol and private IP detection in GET() in route.ts.
    • Log general errors in GET() in route.ts.
  • Formatting:
    • Fix indentation in checkURLForPrivateIP() in ip.ts.

This description was created by Ellipsis for d54cb45. It will automatically update as commits are pushed.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 31, 2025 11:40am

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to d54cb45 in 1 minute and 5 seconds

More details
  • Looked at 44 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 drafted comments based on config settings.
1. app/api/metadata/proxy/feature/ip.ts:90
  • Draft comment:
    Ensure consistent indentation and brace formatting. The extra manual adjustment looks fine, but verify that no logic was inadvertently changed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
2. app/api/metadata/proxy/route.ts:49
  • Draft comment:
    Logging adds useful context. Consider if sensitive details (protocol, hostname, error details) could be exposed in production logs and ensure proper sanitization if needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
3. app/api/metadata/proxy/feature/ip.ts:90
  • Draft comment:
    Indentation fix: The updated block now consistently nests the 'if' block inside the 'for' loop. This improves readability.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50%
    None
4. app/api/metadata/proxy/route.ts:50
  • Draft comment:
    Logging unsupported protocol: Consider including additional context (e.g. full URL) if safe to improve traceability.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
5. app/api/metadata/proxy/route.ts:56
  • Draft comment:
    Logging private IP: The log prints the hostname. Ensure that outputting such details complies with privacy guidelines or consider redacting sensitive info if needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
6. app/api/metadata/proxy/route.ts:60
  • Draft comment:
    Logging caught errors: Using console.error for the caught error aids in debugging. For production, consider integrating a centralized logging mechanism if needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50%
    None
7. app/api/metadata/proxy/feature/ip.ts:59
  • Draft comment:
    Typographical error: The comment on line 59 says 'private rande' when it should say 'private range'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
8. app/api/metadata/proxy/route.ts:48
  • Draft comment:
    Minor typo in the comment: Instead of "check that uri has supported protocol despite of any other checks", consider rephrasing it to "check that the URI has a supported protocol regardless of any other checks" for better clarity.
  • Reason this comment was not posted:
    Comment was on unchanged code.
9. app/api/metadata/proxy/route.ts:96
  • Draft comment:
    Typographical note: In the responseHeaders object, the header key 'Etag' is used. It might be more conventional to use 'ETag' to match standard HTTP header capitalization.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_8iQoPisFMGs5sTob


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@ngundotra ngundotra merged commit d7a3b7d into master Mar 31, 2025
4 checks passed
@ngundotra ngundotra deleted the log-proxy-errors branch March 31, 2025 11:43
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