forked from trent_larson/crowd-funder-for-time-pwa
feat(logging): enhance debug logging across app
Improves application logging and error tracking: - Add structured logging in main.common.ts for app initialization - Enhance API error handling with detailed context in services - Add deep link debugging in Capacitor platform - Improve plan service logging with retry information - Update endorser server logs for better cache debugging Technical changes: - Replace console.error with info for non-critical cache misses - Add component context to global error handler - Add detailed logging for plan loading and retries - Improve deep link route matching logs - Add mount state logging for Capacitor This improves debugging capabilities across web and mobile platforms.
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
export const handleApiError = (error: any, endpoint: string) => {
|
||||
if (process.env.VITE_PLATFORM === 'capacitor') {
|
||||
console.error(`[Capacitor API Error] ${endpoint}:`, error);
|
||||
console.error(`[Capacitor API Error] ${endpoint}:`, {
|
||||
message: error.message,
|
||||
status: error.response?.status,
|
||||
data: error.response?.data,
|
||||
config: {
|
||||
url: error.config?.url,
|
||||
method: error.config?.method,
|
||||
headers: error.config?.headers
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Specific handling for rate limits
|
||||
|
||||
Reference in New Issue
Block a user