Refactor image upload logic to use access token from preferences and error handling#26
Open
iamrajeshk wants to merge 2 commits into
Open
Refactor image upload logic to use access token from preferences and error handling#26iamrajeshk wants to merge 2 commits into
iamrajeshk wants to merge 2 commits into
Conversation
…improve error handling
…ce properly; update input type for decimal values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and refactors to the KartaView photo upload flow, focusing on better API usage, improved error handling, and more secure access token management. The changes also add a dedicated HTTP client for KartaView with retries and update some constants and preferences.
KartaView Integration and Refactoring:
Refactored the KartaView photo upload process in
AbstractOsmQuestFormto:Preferences.kartaViewAccessTokenproperty instead of hardcoded values.getPhotoLthUrlfunction, which fetches the correct LTH image URL via a dedicated API call.Added a dedicated KartaView HTTP client (
named("kartaViewClient")) with JSON support and automatic retries for server errors and exceptions, improving reliability of network operations. [1] [2]Preferences and Configuration:
kartaViewAccessTokenproperty in thePreferencesclass, with a default value, allowing the access token to be managed securely and consistently across the app. [1] [2]Other Minor Updates:
Updated the error report email address in
ApplicationConstantsto a new support address.Cleaned up imports in
AbstractOsmQuestFormto reflect updated dependencies and removed unused classes. [1] [2] [3]These changes collectively improve the maintainability, security, and reliability of the KartaView photo upload feature.