@budarin/pluggable-serviceworker 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -136,8 +136,8 @@ const config = {
|
|
|
136
136
|
break;
|
|
137
137
|
|
|
138
138
|
default:
|
|
139
|
-
//
|
|
140
|
-
console.error('
|
|
139
|
+
// Неизвестные типы ошибок
|
|
140
|
+
console.error('Unknown error type:', error);
|
|
141
141
|
|
|
142
142
|
// Отправка ошибки в аналитику
|
|
143
143
|
fetch('/api/errors', {
|
|
@@ -167,11 +167,11 @@ initializeServiceWorker(
|
|
|
167
167
|
|
|
168
168
|
Используйте enum `ServiceWorkerErrorType` для типизированной обработки ошибок:
|
|
169
169
|
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
170
|
+
- _`ServiceWorkerErrorType.ERROR`_ - JavaScript ошибки (ErrorEvent)
|
|
171
|
+
- _`ServiceWorkerErrorType.MESSAGE_ERROR`_ - Ошибки при обработке сообщений (MessageEvent)
|
|
172
|
+
- _`ServiceWorkerErrorType.UNHANDLED_REJECTION`_ - Необработанные Promise rejection
|
|
173
|
+
- _`ServiceWorkerErrorType.REJECTION_HANDLED`_ - Обработанные Promise rejection
|
|
174
|
+
- _`ServiceWorkerErrorType.PLUGIN_ERROR`_ - Ошибки в плагинах
|
|
175
175
|
|
|
176
176
|
## 🔧 API
|
|
177
177
|
|