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

Illegal class passed as substitution, found function #4335

Closed
illunix opened this issue Mar 13, 2024 · 13 comments
Closed

Illegal class passed as substitution, found function #4335

illunix opened this issue Mar 13, 2024 · 13 comments
Labels
dependencies Pull requests that update a dependency file type:bug A broken experience
Milestone

Comments

@illunix
Copy link

illunix commented Mar 13, 2024

I've upgraded to latest kiota version 12.0 and I get this when sending request with guid as route parameter

image
image

@github-project-automation github-project-automation bot moved this to Todo in Kiota Mar 13, 2024
@illunix illunix closed this as completed Mar 13, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Kiota Mar 13, 2024
@illunix illunix changed the title Failed to execute 'fetch' on 'Window': Illegal invocation Illegal class passed as substitution, found function Mar 13, 2024
@illunix illunix reopened this Mar 13, 2024
@github-project-automation github-project-automation bot moved this from Done to In Progress in Kiota Mar 13, 2024
@baywet baywet added question TypeScript Pull requests that update Javascript code labels Mar 15, 2024
@baywet baywet added this to the Backlog milestone Mar 15, 2024
@baywet
Copy link
Member

baywet commented Mar 15, 2024

Hi @illunix ,
Thanks for reporting this.
Can you share the URI template from the request builder please?
As well as the parameters and their values?
Thanks!

@illunix
Copy link
Author

illunix commented Mar 15, 2024

image
image
image
Do you need something else too? @baywet

@baywet
Copy link
Member

baywet commented Mar 18, 2024

Thanks for the additional information, what library are you using for guid? Is this Microsoft Graph or another API?

@illunix
Copy link
Author

illunix commented Mar 18, 2024

I use from guid-typescript @baywet

@baywet
Copy link
Member

baywet commented Mar 18, 2024

Thanks for the additional information. What if you call .toString() before passing the value to the fluent API?

@illunix
Copy link
Author

illunix commented Mar 18, 2024

image
Here on user id or what do you mean?

@baywet
Copy link
Member

baywet commented Mar 18, 2024

await client.users.byUserId(userId.toString()).delete();

@illunix
Copy link
Author

illunix commented Mar 18, 2024

But byUserId accept guid as parameter not string

@baywet
Copy link
Member

baywet commented Mar 18, 2024

Thanks for the precision. Opened an issue in the uri template library here.
std-uritemplate/std-uritemplate#140

Closing since no changes are required in kiota.

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kiota Mar 18, 2024
@baywet baywet added type:bug A broken experience dependencies Pull requests that update a dependency file and removed question TypeScript Pull requests that update Javascript code Needs: Attention 👋 labels Mar 18, 2024
@illunix
Copy link
Author

illunix commented Mar 18, 2024

You think it will take a lot of time to fix because I need it so bad @baywet

@baywet
Copy link
Member

baywet commented Mar 18, 2024

The best thing to get it fix quickly is to submit a PR over there :)

@illunix
Copy link
Author

illunix commented Mar 18, 2024

Okey, can u give me a hint in what file this fix will need to be?

@baywet
Copy link
Member

baywet commented Mar 18, 2024

let's have that discussion on the other I created please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file type:bug A broken experience
Projects
Archived in project
Development

No branches or pull requests

2 participants