86 lines
3.7 KiB
TypeScript
86 lines
3.7 KiB
TypeScript
/* Metro module 5184; source: modules/collectibles/utils/ErrorHandlingUtils.tsx; dependencies: [661, 1216, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
function _fun45677(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5362:6, offset: 0x01194eb7, size: 232 bytes, params: 8, frame: 19
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const AbortCodes = (ConstantsModule).AbortCodes;
|
|
const UNAUTHORIZED = AbortCodes.UNAUTHORIZED;
|
|
items2 = [UNAUTHORIZED];
|
|
const EMAIL_VERIFICATION_REQUIRED = AbortCodes.EMAIL_VERIFICATION_REQUIRED;
|
|
items2[1] = EMAIL_VERIFICATION_REQUIRED;
|
|
const USER_BANNED = AbortCodes.USER_BANNED;
|
|
items2[2] = USER_BANNED;
|
|
let Set = global.Set;
|
|
let set = new Set([500, 502, 503, 504]);
|
|
Set = global.Set;
|
|
set = new Set([401, 403, 405, 409, 429]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/utils/ErrorHandlingUtils.tsx');
|
|
exports.captureOrIgnoreApiError = captureOrIgnoreApiError;
|
|
function captureOrIgnoreApiError(a0) { // fn#45678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5362:351, offset: 0x01194f9f, size: 420 bytes, params: 2, frame: 20
|
|
var cause;
|
|
var r5;
|
|
var r4;
|
|
var r6;
|
|
var r3;
|
|
var r1;
|
|
var r0;
|
|
var value2;
|
|
var value3;
|
|
var value12;
|
|
let value = a0 == null;
|
|
if (value) {
|
|
r0 = value;
|
|
} else {
|
|
value = false;
|
|
if (a0 == null) {
|
|
r1 = value;
|
|
} else {
|
|
value = undefined;
|
|
cause = a0 == null ? value : a0.cause;
|
|
value2 = (cause == null ? value : cause.crossDomain) === true;
|
|
if (value2) {
|
|
r3 = value2;
|
|
} else {
|
|
value3 = 'status' in a0;
|
|
r5 = value3 ? typeof a0.status !== 'number' : !value3;
|
|
if (!r5) {
|
|
r4 = a0.status !== 0 && !env0_3.has(a0.status);
|
|
r4 = r4 && !env0_4.has(a0.status);
|
|
r5 = r4;
|
|
}
|
|
if (r5) {
|
|
value12 = 'code' in a0;
|
|
r6 = value12 ? typeof a0.code !== 'number' : !value12;
|
|
r6 = !r6 ? !env0_2.includes(a0.code) : r6;
|
|
if (r6) {
|
|
r6 = 'body' in a0 && a0.body != null;
|
|
r6 = r6 && typeof a0.body === 'object';
|
|
r6 = r6 && 'code' in a0.body;
|
|
r6 = r6 && typeof (a0.body == null ? value : a0.body.code) === 'number';
|
|
r6 = r6 && env0_2.includes(a0.body.code);
|
|
value = !!r6;
|
|
r5 = value;
|
|
} else {
|
|
r5 = !r6;
|
|
}
|
|
r4 = r5;
|
|
} else {
|
|
r4 = !r5;
|
|
}
|
|
r3 = r4;
|
|
}
|
|
r1 = r3;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
if (!r0) {
|
|
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(a0);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun45677, 5184, [661, 1216, 2]) /* metro module 5184, dependencies: [661, 1216, 2] */;
|