Sitecore / Sitecore/content-sdk

debug-js outputs to stderr by default causing Vercel to see request as erred

Open
#528 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

🐞 bug
Dominant language
TypeScript
Stars
37
Forks
41
Avg merge
2d 3h
Merged PRs (30d)
22

Description

Describe the Bug

The debug-js library outputs to stderr by default, causing the Vercel log to see any request that contains debug-js output to be an error.

To Reproduce

Enable content-sdk debug output on a deployed content-sdk app in Vercel. Visit a page on the app and view that request in the logs.

Expected Behavior

Informational logs do not output to STDERR and do not cause hosting providers to see requests as erred or output informational log lines in a "red" color because they output to STDERR.

Possible Fix

Ideally, switch to a more robust logging library with logging levels. Short term, offer option to redirect output to STDOUT instead of STDERR.

Provide environment information
  • Sitecore Version: Sitecore AI
  • Content SDK Version: 2.0.1
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project (if available):

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating where content-sdk enables debug-js output and reproduce the behavior with debug logging enabled in a deployed Vercel app. Trace which stream receives informational messages, then verify that informational output no longer appears as request errors or red log lines while checking the existing debug behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.