WIP: certificate view and dependency updates

- Update certificate view canvas rendering and QR code generation
- Upgrade dependencies (expo-file-system, expo-font, expo-keep-awake)
- Fix type imports for nostr-tools and dexie-export-import
- Update vite config for better dependency resolution
- Clean up main entry points (capacitor, electron, pywebview)
- Improve error handling in API and plan services
- Add type safety to API error handling
- Update build configuration for platform-specific builds

This is a work in progress commit focusing on certificate view improvements
and dependency maintenance. Some type definitions and build configurations
may need further refinement.
This commit is contained in:
Matthew Raymer
2025-02-21 09:47:24 +00:00
parent b5b5d45b99
commit f33d1f0af3
13 changed files with 636 additions and 603 deletions

View File

@@ -1,5 +1,7 @@
export const handleApiError = (error: any, endpoint: string) => {
if (process.env.VITE_PLATFORM === 'capacitor') {
import { AxiosError } from "axios";
export const handleApiError = (error: AxiosError, endpoint: string) => {
if (process.env.VITE_PLATFORM === "capacitor") {
console.error(`[Capacitor API Error] ${endpoint}:`, {
message: error.message,
status: error.response?.status,
@@ -7,16 +9,16 @@ export const handleApiError = (error: any, endpoint: string) => {
config: {
url: error.config?.url,
method: error.config?.method,
headers: error.config?.headers
}
headers: error.config?.headers,
},
});
}
// Specific handling for rate limits
if (error.response?.status === 400) {
console.warn(`[Rate Limit] ${endpoint}`);
return null;
}
throw error;
};
};