Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/stdout error messages for nodejs example codes #434

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

c0ridrew
Copy link
Contributor

@c0ridrew c0ridrew commented Nov 20, 2024

Description

Add try catch to capture error response in nodejs example codes

Before

calling post unix:/Users/andrew/.nodex/run/nodex.sock:/custom_metrics
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

HTTPError: Response code 400 (Bad Request)

After

calling post unix:/Users/andrew/.nodex/run/nodex.sock:/custom_metrics
Error in API call: Response code 400 (Bad Request)
Error response: Json deserialize error: invalid type: integer `1732080288808`, expected a string at line 1 column 59
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

HTTPError: Response code 400 (Bad Request)

@c0ridrew c0ridrew self-assigned this Nov 20, 2024
@c0ridrew c0ridrew force-pushed the feature/add-error-message-nodejs-example branch from 7fcda60 to 6e07c61 Compare November 20, 2024 06:18
@c0ridrew c0ridrew force-pushed the feature/add-error-message-nodejs-example branch from 6e07c61 to b7a8631 Compare November 20, 2024 06:21
@c0ridrew c0ridrew marked this pull request as ready for review November 20, 2024 06:36
@c0ridrew c0ridrew requested a review from a team as a code owner November 20, 2024 06:36
@c0ridrew c0ridrew requested a review from da13da November 20, 2024 06:36
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