This repository has been archived by the owner on Dec 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Consistent JSON API incl. Proper Handling of Errors (2nd half of big refactoring) #282
Merged
Conversation
This file contains 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
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Kamil Iskra <kamil.01482@iskra.name>
kamil4
reviewed
Apr 14, 2022
kamil4
reviewed
Apr 22, 2022
kamil4
reviewed
Apr 25, 2022
kamil4
reviewed
Apr 25, 2022
Co-authored-by: Kamil Iskra <kamil.01482@iskra.name>
kamil4
reviewed
Apr 29, 2022
kamil4
reviewed
May 1, 2022
Co-authored-by: Kamil Iskra <kamil.01482@iskra.name>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
API for access to Backend Revised
The API to access the backend has been revised and adopted to the new way how error and exceptions are reported. The frontend now properly observes the HTTP status code and only passes successful responses (2xx) to the success handler. If Lychee reports an exception, the received exception object is properly parsed and displayed to the user.
Code for importing/uploaded got heavily revised
As the streamed response for a import of photos from the server has been changed drastically, the frontend code has been changed, too.
This is were most of the "real" work went into.
Completely annotated JS code with parameter and returns types
This part has already been read by you and is responsible for most of the diff :-( although is does not change anything. Most of the TODOs which have been created are future work, because they are totally unrelated to the current re-factoring. Changes to the code were only made to the extent to make SonarCloud happy again. After adding the type annotation, the rating dropped to C because SonarCloud was suddenly able perform a much deeper static code analyse. But we are back to an A-rating now.
Miscellaneous
Simplified and more secure handling of CSFR token.