summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-14 13:57:16 +0300
committerAlexander_Kabui2024-05-14 13:57:16 +0300
commit381a8afdaf56a669f2227caf21718bbd6a11bb89 (patch)
tree0eeb137a19ae2fb1db1185152702cbf9143a735a
parentb44d577124ae6fb5e62674528060289c0d31fd6a (diff)
downloadgn-gemtext-381a8afdaf56a669f2227caf21718bbd6a11bb89.tar.gz
Fix Syntax and keywords for issue.
-rw-r--r--issues/htmx-error-handling.gmi15
1 files changed, 7 insertions, 8 deletions
diff --git a/issues/htmx-error-handling.gmi b/issues/htmx-error-handling.gmi
index e8612fe..38e0662 100644
--- a/issues/htmx-error-handling.gmi
+++ b/issues/htmx-error-handling.gmi
@@ -6,12 +6,12 @@
* priority: high
* status: open
* assigned: alexm
-* keywords: url
+* keywords: htmx,error,javascript,api
## Description
The issue occurs when you send a post request using HTMX javascript Api.this does
-not provide a well defined to handle errors from the callback
-A code snippet can be show below
+not provide a well defined way to handle errors from the callback
+A code snippet can be show below to reproduce the issue:
```js
htmx.on("#upvote", "click", function(evt){
@@ -25,16 +25,15 @@ alert("html")
})
});
```
-In the above snipped incase of a response error you would expert the catch method
-method to be invoked but that doesn'tn occur
-This is the htmx docs which does not provide a proper error handling mechanism
-
+In the above snippet; incase of a response error you would expert the catch error
+method to be invoked but only the success callback is invoked
+This is the htmx api docs which does not provide a proper error handling mechanism
=> https://htmx.org/api/
## Note
the reason for using the htmx javascript api is to toggle the rating class for
both like and dislike functionality depending if the requests fails or succeeds
-
+An alternative would be to explore using javascript/jquery to achieve this(TODO)