-
Notifications
You must be signed in to change notification settings - Fork 427
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
chore: add support for full log message in persist API #2659
Conversation
WalkthroughThe changes involve updates to error handling messages in Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant Logger
Client->>Server: Send delete request
Server->>Logger: Log deletion attempt
Logger-->>Server: Log success/failure
Server-->>Client: Return response (error message updated)
Client->>Server: Send update request
Server->>Logger: Log update attempt
Logger-->>Server: Log success/failure
Server-->>Client: Return response (error message updated)
Client->>Server: Send log request
Server->>Logger: Log request with new structure
Logger-->>Server: Log success/failure
Server-->>Client: Return response
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
736e70f
to
524f426
Compare
895ee27
to
00fee1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/deleteRecords.ts (1 hunks)
- packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/putRecords.ts (1 hunks)
- packages/persist/lib/routes/environment/environmentId/postLog.ts (4 hunks)
Additional comments not posted (8)
packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/putRecords.ts (1)
51-51
: LGTM!The change to the error message aligns it with the intended functionality of the
putRecords
operation.packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/deleteRecords.ts (1)
51-51
: LGTM!The updated error message accurately reflects the operation being performed and improves clarity in the API's response.
packages/persist/lib/routes/environment/environmentId/postLog.ts (6)
11-16
: LGTM!The code changes are approved.
17-22
: LGTM!The code changes are approved.
24-82
: LGTM!The code changes are approved.
90-90
: LGTM!The code changes are approved.
99-105
: LGTM!The code changes are approved.
118-147
: LGTM!The code changes are approved.
00fee1c
to
eb233d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/deleteRecords.ts (1 hunks)
- packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/putRecords.ts (1 hunks)
- packages/persist/lib/routes/environment/environmentId/postLog.ts (4 hunks)
Files skipped from review as they are similar to previous changes (2)
- packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/deleteRecords.ts
- packages/persist/lib/routes/environment/environmentId/connection/connectionId/sync/syncId/job/jobId/putRecords.ts
Additional comments not posted (6)
packages/persist/lib/routes/environment/environmentId/postLog.ts (6)
11-16
: LGTM!The code changes are approved.
24-27
: LGTM!The code changes are approved.
29-82
: LGTM!The code changes are approved.
90-90
: LGTM!The code changes are approved.
99-105
: LGTM!The code changes are approved.
118-145
: LGTM!The code changes are approved.
## Describe your changes Please review #2659 first Sending full message logs from scripts instead of simplified ones allowing: - to attach request and response when proxying - better display of `nango.log('with payload', {a: 1})`. Payload now shows as payload in the UI and it is not appended as string to the message anymore. It is automatically fixing the display of validation output for instance ![Screenshot 2024-08-30 at 14 28 51](https://github.com/user-attachments/assets/a9936d0b-3235-45fc-9f90-4881189e8b64) ![Screenshot 2024-08-30 at 14 28 04](https://github.com/user-attachments/assets/6e1cc977-74e0-4958-8f0b-e91f15399abc) ![Screenshot 2024-08-30 at 14 29 19](https://github.com/user-attachments/assets/6fe6abac-88f9-4023-b9d7-5239890ce0bb) ## Issue ticket number and link https://linear.app/nango/issue/NAN-1525/improve-actions-error-logs ## Checklist before requesting a review (skip if just adding/editing APIs & templates) - [ ] I added tests, otherwise the reason is: - [ ] I added observability, otherwise the reason is: - [ ] I added analytics, otherwise the reason is: <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced logging capabilities with a new structured log format, including additional fields for improved detail and clarity. - **Bug Fixes** - Updated logging mechanisms to improve type safety and streamline logging processes. - **Chores** - Removed unnecessary dependencies to simplify the project's dependency management. - **Documentation** - Updated test cases to validate new log structures, ensuring consistency and clarity in logging behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Describe your changes
Following up on #2658 Please review this one first
Adding support for passing full log message to persistAPI. We are still sending legacy simplified logs for now.
Issue ticket number and link
https://linear.app/nango/issue/NAN-1525/improve-actions-error-logs
Checklist before requesting a review (skip if just adding/editing APIs & templates)
Summary by CodeRabbit
New Features
Bug Fixes
Documentation