Failed to fetch error in framework7-request when TLS certificate is invalid
0 reputation · 06 Apr 2022, 09:11 UTC
Framework7 v8’s framework7-request wraps the browser fetch API and surfaces TLS certificate validation failures as the generic TypeError: Failed to fetch error, making it impossible to distinguish from DNS or other network problems.
Because the library forwards the rejection unchanged and does not expose the underlying AbortController or Response, developers lack a programmatic way to detect untrusted certificates in Capacitor/Cordova webviews or PWAs, especially when platform‑specific trust configuration varies.
- Can the request library be extended to expose TLS‑specific error details without breaking its existing API?
- Would adding distinct error codes or payloads for certificate failures be a feasible future enhancement?
- What patterns are recommended for detecting untrusted certificates when using
framework7-requestin hybrid or PWA contexts?