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

Do not query TMDB when no API key configured #310

Open
1 task done
cweiske opened this issue Nov 21, 2024 · 0 comments
Open
1 task done

Do not query TMDB when no API key configured #310

cweiske opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cweiske
Copy link

cweiske commented Nov 21, 2024

Describe your suggested feature

Miru always asks the TMDB API even when no API key is configured. In that case, TMDB returns a HTTP 401 status code.

This is especially annoying when developing an extension - every time an episode is opened, the log is spammed with those HTTP errors:

Miru SEVERE 2024-11-21 14:52:48.431719:  DioException [bad response]: This exception was thrown because the response has a status code of 401 and RequestOptions.validateStatus was configured to throw for this status code.
The status code of 401 has the following meaning: "Client error - the request contains bad syntax or cannot be fulfilled"
Read more about status codes at https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
In order to resolve this exception you typically have either to verify and fix your request code or you have to fix the server code.
 #0      DioMixin.fetch (package:dio/src/dio_mixin.dart:509)
<asynchronous suspension>
#1      V3._query (package:tmdb_api/versions/v3.dart:120)
<asynchronous suspension>
#2      TmdbApi.getDetailBySearch (package:miru_app/data/providers/tmdb_provider.dart:15)
<asynchronous suspension>
#3      DetailPageController.getRemoteTMDBDetail (package:miru_app/controllers/detail_controller.dart:259)
<asynchronous suspension>

Acknowledgements

  • I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
@cweiske cweiske added the enhancement New feature or request label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant