diff options
author | 2023-06-03 13:58:57 +0200 | |
---|---|---|
committer | 2023-06-03 13:58:57 +0200 | |
commit | 21c1552daafbcedbd2e19b0c155ff8db9cff2be0 (patch) | |
tree | 00d945280a72d30d51acb618ad7257432d1f9e1a /internal/api/util/errorhandling.go | |
parent | [bugfix] Fix first item of thread dereferencing always being skipped (#1858) (diff) | |
download | gotosocial-21c1552daafbcedbd2e19b0c155ff8db9cff2be0.tar.xz |
[chore] Update versions, fix lint errors (#1860)
Diffstat (limited to 'internal/api/util/errorhandling.go')
-rw-r--r-- | internal/api/util/errorhandling.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/api/util/errorhandling.go b/internal/api/util/errorhandling.go index 8c0251e57..9128ce499 100644 --- a/internal/api/util/errorhandling.go +++ b/internal/api/util/errorhandling.go @@ -117,7 +117,8 @@ func ErrorHandler(c *gin.Context, errWithCode gtserror.WithCode, instanceGet fun // or if we should just use a json. Normally we would want to // check for a returned error, but if an error occurs here we // can just fall back to default behavior (serve json error). - accept, _ := NegotiateAccept(c, JSONOrHTMLAcceptHeaders...) + // Prefer provided offers, fall back to JSON or HTML. + accept, _ := NegotiateAccept(c, append(offers, JSONOrHTMLAcceptHeaders...)...) if errWithCode.Code() == http.StatusNotFound { // Use our special not found handler with useful status text. |