-
Notifications
You must be signed in to change notification settings - Fork 6
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
"Unexpected end of JSON input" from Trakt API when username doesn't exist #415
Comments
Turns out it was something obvious: I had my username wrong. I guess this is what happens when you specify a non-existent username. Might be good to catch that and display a better error. |
Same error occurs if the user is private (as I was -- just made myself public to run this and worked successfully) Not sure if more verbose error codes/messages are received that could provide some more help? |
I'll have a quick look, but "unexpected end of json input" makes me think it's probably just an empty 404. Nevertheless it should definitely be handled more gracefully. |
@bbeesley Any plans to convert the JavaScript to Typescript? I pulled the code down and my VS code setup complained about the use of |
lmao, yeah, I haven't looked at this repo in ages and basically did the same thing earlier today, started refactoring. I'm at work at the moment so I've got other stuff to do right now, but after work I'll create a |
@cbserra ok, I've done a bunch of tidying up, migrated it to typescript, and moved the ci over to github actions. Should be in a good state now if you wanna improve the error handling or do some refactoring. I didn't change any of the functionality, just build/test/publish stuff. fyi, I've moved it over to pnpm as well; aint nobody got time for npm ci. |
Trying trakt-to-letterboxd for the first time, this is what I'm getting:
I can crack open the Node debugger to inspect the JSON responses if necessary, but I thought I'd make sure I'm not missing anything obvious.
The text was updated successfully, but these errors were encountered: