numerus/pkg
jordi fita mas 0b74c7a91c Instruct htmx that HTTP 422 is not a “fatal error”
I use HTTP 422 to signal that a form was submitted with bad data,
which i believe is the correct status code: “indicates that the server
understands the content type of the request content […], and the syntax
of the request content is correct, but it was unable to process the
contained instructions.”[0]

htmx, however, treats all 4xx status codes as error and, by default,
does not swap the target with the response’s content.  Until i found out
that i could change that behaviour, i worked around this limitation by
returning HTTP 200 for htmx requests, but it is a waste of time given
that htmx _can_ accept HTTP 422 as a non-error.

[0]: https://www.rfc-editor.org/rfc/rfc9110#name-422-unprocessable-content
2024-08-27 11:07:39 +02:00
..
accounts.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
attachment.go Refactor common code to download invoice and expenses attachments 2024-08-12 00:07:30 +02:00
build.go Add the application’s version on the footer 2024-01-19 20:03:04 +01:00
company.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
contacts.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
dashboard.go Compute the total amount, base plus taxes, of all expenses 2023-07-13 20:50:26 +02:00
db.go Allow importing contacts from Holded 2023-07-03 00:05:47 +02:00
expenses.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
form.go Add the payments section 2024-08-10 04:34:07 +02:00
htmx.go Use HTMx to add product rows “inline” in the invoice form 2023-04-24 02:00:38 +02:00
invoices.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
locale.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
logger.go Reduce the amount of useless data in request’s log 2023-06-13 16:05:40 +02:00
login.go Allow removal of payments 2024-08-11 03:22:37 +02:00
ods.go Include customer’s VAT number to the expense list in ODS too 2024-07-20 22:52:23 +02:00
payments.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
pgtypes.go Add a cache of OID in database to register types 2023-10-27 12:44:24 +02:00
products.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
profile.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
quote.go Instruct htmx that HTTP 422 is not a “fatal error” 2024-08-27 11:07:39 +02:00
recover.go Gofmt recover.go 2023-01-22 20:37:34 +01:00
router.go Add a new collection “subsection” for invoices 2024-08-21 11:22:53 +02:00
slug.go Add the customer name to the invoice’s PDF file name 2023-07-07 11:34:34 +02:00
tags.go Refactor inline tag edit form into its own file 2024-08-15 04:18:18 +02:00
template.go Allow removal of payments 2024-08-11 03:22:37 +02:00
uuid.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
uuid_test.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00