From 3a4dc79a2efaa8edd2cf10fd7c8e9e93f1a5cb37 Mon Sep 17 00:00:00 2001 From: Magrexy Date: Tue, 28 Jul 2026 22:08:50 +0100 Subject: [PATCH] fix: add uuid import via expo-crypto for request ID generation --- src/services/api/axios.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/services/api/axios.config.ts b/src/services/api/axios.config.ts index 9671341..285ab85 100644 --- a/src/services/api/axios.config.ts +++ b/src/services/api/axios.config.ts @@ -11,6 +11,7 @@ */ import axios, { AxiosError, InternalAxiosRequestConfig } from 'axios'; +import * as Crypto from 'expo-crypto'; import { getEnv } from '../../config'; import { MUTATION_INVALIDATION_MAP } from '../../config/apiCacheConfig'; @@ -214,7 +215,7 @@ function processRefreshQueue(token: string | null, error: unknown) { apiClient.interceptors.request.use( async (config: InternalAxiosRequestConfig & { _requestStartMs?: number }) => { - const requestId = uuidv4(); + const requestId = Crypto.randomUUID(); config.headers['X-Request-ID'] = requestId; pushLogContext({ requestId });