Repository: astralapp/astral (language: php)

Issue:
When you try to add an already existing tag, Astral takes you back to sign in
Hi, 

first of all, thanks a lot for the amazing tool! It's great to find my way across the many repositories I starred. So, here is the issue description and procedure to reproduce it:

1. [sign in to Astral](https://app.astralapp.com/auth)
2. try adding a tag which already exists in your tag list
3. The app takes you back to the sign in page

I was taken back to login a few times before I realized I already added that tag in the past, so that may be confusing, expecially for new users. 

**System**
OS: macOS 10.15.7 (19H1323)
Browser: Chrome, version 92.0.4515.159 (Official Build) (x86_64)


**Proposal**
When the user tries to add an already existing tag, capture the error & show a (popup?) message which says "tag {s} already existing", rather than just crashing and exiting the web app.


Discussion / hints:

Fix patch:
diff --git a/resources/assets/js/store/api/client.js b/resources/assets/js/store/api/client.js
index 3dd7aa84..81ceb971 100644
--- a/resources/assets/js/store/api/client.js
+++ b/resources/assets/js/store/api/client.js
@@ -12,7 +12,9 @@ http.interceptors.response.use(
   function(response) {
     return response
   },
-  function() {
+  function(error) {
+    const resp = error.response
+    if ('status' in resp && resp.status === 422) return Promise.reject(resp.data)
     router.push('auth/logout')
   }
 )


Test patch: