Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query Value not being set #12

Open
AdzeB opened this issue Aug 3, 2024 · 5 comments
Open

Query Value not being set #12

AdzeB opened this issue Aug 3, 2024 · 5 comments

Comments

@AdzeB
Copy link

AdzeB commented Aug 3, 2024

Query value is not being set even with hardCoded value

Request:

  const { data, error } = await $fetch("@post/device/unlinkButton", {
      query: {
        userId: userData.id || 0,
      },
    });

LOG:

 LOG  info  Request being sent to: https://api_here.com/api/device/unlinkButton
 LOG  fail  Request failed with status:  400 (Bad Request)
 LOG  error {"message": "Value cannot be null. (Parameter 's')", "status": 400, "statusCode": "400", "statusText": ""}
 LOG  12:23:34 | ERROR : Error unlinking button: 
{
  "status": 400,
  "statusCode": "400",
  "message": "Value cannot be null. (Parameter 's')",
  "statusText": ""
}

Set Up
image

@Bekacru
Copy link
Owner

Bekacru commented Aug 3, 2024

Hey, I tried to take a look and it seems like it should be working. The screenshot below works correctly. To better understand the issue you're experiencing, could you please provide a reproducible example? A CodePen, JSFiddle, or a similar online code editor link would be very helpful.

code

@AdzeB
Copy link
Author

AdzeB commented Aug 3, 2024

Hi I added the customFetchImpl to log it

Impl

  const { data, error } = await $fetch("@post/device/unlinkButton", {
      query: { userId: 10 },
    });

LOGs:

LOG  info  Request being sent to: https://api.here.com/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  Retrying request. Attempted Request: https://api.here.com/api/device/unlinkButton, Attempted Response: 400  
WARN  warn  Retrying request... Attempt: 1  
LOG  info  Request being sent to: https://api.here.com/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  Retrying request. Attempted Request: https://api.here.com/api/device/unlinkButton, Attempted Response: 400  
WARN  warn  Retrying request... Attempt: 2  
LOG  info  Request being sent to: https://api.here.comt/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  Retrying request. Attempted Request: https://api.here.com/api/device/unlinkButton, Attempted Response: 400  
WARN  warn  Retrying request... Attempt: 3  
LOG  info  Request being sent to: https://api.here.com/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  error {"message": "Value cannot be null. (Parameter 's')", "status": 400, "statusCode": "400", "statusText": ""}  
LOG  17:52:17 | ERROR : Error unlinking button:   
{  
 "status": 400,  
 "statusCode": "400",  
 "message": "Value cannot be null. (Parameter 's')",  
 "statusText": ""  
}  

@Bekacru
Copy link
Owner

Bekacru commented Aug 4, 2024

Hi I added the customFetchImpl to log it

Impl

  const { data, error } = await $fetch("@post/device/unlinkButton", {
      query: { userId: 10 },
    });

LOGs:

LOG  info  Request being sent to: https://api.here.com/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  Retrying request. Attempted Request: https://api.here.com/api/device/unlinkButton, Attempted Response: 400  
WARN  warn  Retrying request... Attempt: 1  
LOG  info  Request being sent to: https://api.here.com/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  Retrying request. Attempted Request: https://api.here.com/api/device/unlinkButton, Attempted Response: 400  
WARN  warn  Retrying request... Attempt: 2  
LOG  info  Request being sent to: https://api.here.comt/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  Retrying request. Attempted Request: https://api.here.com/api/device/unlinkButton, Attempted Response: 400  
WARN  warn  Retrying request... Attempt: 3  
LOG  info  Request being sent to: https://api.here.com/api/device/unlinkButton  
LOG  false  
LOG  {}  
LOG  fail  Request failed with status:  400 (Bad Request)  
LOG  error {"message": "Value cannot be null. (Parameter 's')", "status": 400, "statusCode": "400", "statusText": ""}  
LOG  17:52:17 | ERROR : Error unlinking button:   
{  
 "status": 400,  
 "statusCode": "400",  
 "message": "Value cannot be null. (Parameter 's')",  
 "statusText": ""  
}  

The issue you're experiencing should generally work, and we have test cases that cover this scenario. To better identify the problem, could you please provide a link to the code in a reproducible format? A github link or online code editors like the ones I suggested above would be great.

@AdzeB
Copy link
Author

AdzeB commented Aug 7, 2024

Okay, no problem I will create it

@blazingh
Copy link

blazingh commented Feb 6, 2025

hey we are experiencing the same issue. everything works fine in chrome but the problem is only happening on safari.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants