Repository navigation
fix: Complete Frenet tracking runs, SSR fetch cache under concurrency and tokens out of logs - #863
Merged
Merged
Conversation
…thout the app Frenet finished the run after the first code, so the remaining tracking updates could be cut; now it waits for all codes. Frenet, Flash Courier and Melhor Envio tracking crons no longer log an error each run when the app isn't installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzZmcNMuAAjtyPLYYbnJBX
…s and after timeouts Concurrent renders shared one response body, which can be read only once, so all but the first failed. A timed out or failed fetch also stayed cached until the instance restarted. Now the parsed data is shared and failures are cleared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzZmcNMuAAjtyPLYYbnJBX
The shared logger masks credential headers (Authorization, Access-Token, API keys) from Axios errors and request configs, which covers TikTok events and store custom integrations. Melhor Envio error logs no longer include headers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzZmcNMuAAjtyPLYYbnJBX
…all on masking Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AzZmcNMuAAjtyPLYYbnJBX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes found while checking the stores' function logs:
codes.forEach(async ...)+resolveper code), so the remaining tracking updates could be cut when the function finished. Now it waits for all codes (Promise.allSettled, still in parallel).app[0]without checking it, logging an error every run on stores where the app isn't installed. Now they just skip.fetchAndCache: concurrent renders shared the sameResponse, so all but the first failed with "Body has already been read". A failed or timed out fetch also stayed inruntimeFetchingsforever, failing every next call for that key until the instance restarted. Now concurrent calls share the parsed data and the entry is cleared on settle. Callers (store sections) already catch errors, the throw contract is unchanged.@cloudcommerce/firebase/lib/config) now masks credential headers (Authorization,Access-Token, API keys, cookie) from Axios errors and request configs in log data, without mutating the original error. Covers the TikTokAccess-Tokeninsend-analytics-eventsand the store custom integrations that logerror.config. Melhor Envio error handling now uses the shared logger and drops headers from its stringified configs.Test plan
Authorization/Access-Tokenthroughlogger.error(err),logger.warn(err, { request: { headers } })andlogger.error(err, { request: err.config }): all masked, stack kept, original error untouched🤖 Generated with Claude Code
https://claude.ai/code/session_01AzZmcNMuAAjtyPLYYbnJBX