fix: extension ignores expired token and fails in the wrong place
This MR fixes an issue where the extension couldn't detect an expired token and it instead threw a generic request failed error. This made these trivial errors hard to debug and users often created an issue in our issue tracker.
This MR did the following changes:
- move the token checking logic from remote FS code to
GitLabNewService
where all API calls can use it - move the
fetchJson
method in theGitLabNewService
for easier use - migrate direct
crossFetch
(our fetch library) calls to use thefetch
function which does expired token handling
The MR is split into 7 commits for easier review.
Related to #487 (closed)
Edited by Tomas Vik (OOO back on 2025-01-02)