Skip to content

Commit 86d83c8

Browse files
authoredMar 26, 2025
[Fix] OAS-10643 Update Error Codes (#675)
* Updated Error Codes for V2 * Updated error codes for v1 * Update Go Toolkit * Update config * Updated GoToolChain * Add Go Tool Chain to v2 tests as well * Downgrade toolchain to 1.23
1 parent b7a8e65 commit 86d83c8

File tree

5 files changed

+702
-46
lines changed

5 files changed

+702
-46
lines changed
 

‎.circleci/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ aliases:
1919
parameters:
2020
goImage:
2121
type: string
22-
default: "gcr.io/gcr-for-testing/golang:1.22.6"
22+
default: "gcr.io/gcr-for-testing/golang:1.22.12"
2323
arangodbImage:
2424
type: string
2525
default: "gcr.io/gcr-for-testing/arangodb/enterprise-preview:devel-nightly"
2626
alpineImage:
2727
type: string
28-
default: "gcr.io/gcr-for-testing/alpine:3.17"
28+
default: "gcr.io/gcr-for-testing/alpine:3.21"
2929
starterImage:
3030
type: string
3131
default: "arangodb/arangodb-starter:latest"

‎Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CURR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
55
ROOTDIR:=$(CURR)
66

77
GOVERSION ?= 1.22.12
8+
GOTOOLCHAIN ?= go1.23.0
89
GOIMAGE ?= golang:$(GOVERSION)
910
GOV2IMAGE ?= $(GOIMAGE)
1011
ALPINE_IMAGE ?= alpine:3.17
@@ -186,6 +187,7 @@ run-unit-tests: run-v2-unit-tests
186187
--rm \
187188
-v "${ROOTDIR}":/usr/code \
188189
-e CGO_ENABLED=$(CGO_ENABLED) \
190+
-e GOTOOLCHAIN=$(GOTOOLCHAIN) \
189191
-w /usr/code/ \
190192
$(GOIMAGE) \
191193
go test $(TESTOPTIONS) $(REPOPATH) $(REPOPATH)/http $(REPOPATH)/agency $(REPOPATH)/vst/protocol
@@ -195,6 +197,7 @@ run-v2-unit-tests:
195197
--rm \
196198
-v "${ROOTDIR}"/v2:/usr/code \
197199
-e CGO_ENABLED=$(CGO_ENABLED) \
200+
-e GOTOOLCHAIN=$(GOTOOLCHAIN) \
198201
-w /usr/code/ \
199202
$(GOIMAGE) \
200203
go test $(TESTOPTIONS) $(REPOPATH)/v2/connection $(REPOPATH)/v2/arangodb/...
@@ -420,7 +423,8 @@ COMMON_DOCKER_CMD_PARAMS = \
420423
-e TEST_ENABLE_SHUTDOWN=$(TEST_ENABLE_SHUTDOWN) \
421424
-e ENABLE_DATABASE_EXTRA_FEATURES=$(ENABLE_DATABASE_EXTRA_FEATURES) \
422425
-e GODEBUG=tls13=1 \
423-
-e CGO_ENABLED=$(CGO_ENABLED)
426+
-e CGO_ENABLED=$(CGO_ENABLED) \
427+
-e GOTOOLCHAIN=$(GOTOOLCHAIN)
424428

425429

426430
# Internal test tasks

‎client_impl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (c *client) SynchronizeEndpoints2(ctx context.Context, dbname string) error
8585
cep, err := c.clusterEndpoints(ctx, dbname)
8686
if err != nil {
8787
// ignore Forbidden: automatic failover is not enabled errors
88-
if !IsArangoErrorWithErrorNum(err, ErrHttpForbidden, ErrHttpInternal, 0, ErrNotImplemented, ErrForbidden) {
88+
if !IsArangoErrorWithErrorNum(err, ErrHttpForbidden, ErrHttpNotImplemented, 0, ErrNotImplemented, ErrForbidden) {
8989
// 3.2 returns no error code, thus check for 0
9090
// 501 with ErrorNum 9 is in there since 3.7, earlier versions returned 403 and ErrorNum 11.
9191
return WithStack(err)

0 commit comments

Comments
 (0)