getting a stale request sometimes
Comments
-
Hi @Filbert,
We have an article in our knowledge base here that explains the different reasons why you could get a stale request.
Would you mind having a look at it? Looking at our logs, I can see the timestamp
1723788454
is sent which isFriday, 16 August 2024 06:07:34
and this request while the actual API call is done atAugust 16th 2024, 09:55:13
hence the error.Hope that helps.
Best,
Loic
0 -
Hello, yes i knew about that.
but i have made using that suggestions which is like the code below. I dont get it how is that possible because when we want to upload, we always call this signature right away. So, it doesnt make sense if something like this will happen. Also, this is an error that comes sometimes. Can you help me to look at it ? Thanksexport async function GET(): Promise<NextResponse> { try { const timestamp = Math.round(new Date().getTime() / 1000); const params_to_sign = { timestamp };
const signature = cloudinary.utils.api_sign_request( params_to_sign, apiSecret ); console.log("timestamp: ", timestamp); return NextResponse.json({ signature, timestamp }, { status: 200 }); } catch (error) { console.error('Error generating signature:', error); return NextResponse.json({ error: "Internal Server Error" }, { status: 500 }); }}0