From f8d08fe948e14f1fb63a6c3b0e0f3cf5c09cd7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Fri, 21 Mar 2025 09:00:33 +0000 Subject: [PATCH 1/7] Updated Error Codes for V2 --- v2/arangodb/shared/error.go | 368 ++++++++++++++++++++++++++++++++++-- 1 file changed, 347 insertions(+), 21 deletions(-) diff --git a/v2/arangodb/shared/error.go b/v2/arangodb/shared/error.go index 2bea1186..f2aa97bf 100644 --- a/v2/arangodb/shared/error.go +++ b/v2/arangodb/shared/error.go @@ -30,40 +30,366 @@ import ( const ( // general errors - ErrNotImplemented = 9 - ErrForbidden = 11 - ErrDisabled = 36 + ErrNoError = 0 + ErrFailed = 1 + ErrSysError = 2 + ErrOutOfMemory = 3 + ErrInternal = 4 + ErrIllegalNumber = 5 + ErrNumericOverflow = 6 + ErrIllegalOption = 7 + ErrDeadPid = 8 + ErrNotImplemented = 9 + ErrBadParameter = 10 + ErrForbidden = 11 + ErrCorruptedCsv = 13 + ErrFileNotFound = 14 + ErrCannotWriteFile = 15 + ErrCannotOverwriteFile = 16 + ErrTypeError = 17 + ErrLockTimeout = 18 + ErrCannotCreateDirectory = 19 + ErrCannotCreateTempFile = 20 + ErrRequestCanceled = 21 + ErrDebug = 22 + ErrIpAddressInvalid = 25 + ErrFileExists = 27 + ErrLocked = 28 + ErrDeadlock = 29 + ErrShuttingDown = 30 + ErrOnlyEnterprise = 31 + ErrResourceLimit = 32 + ErrArangoIcuError = 33 + ErrCannotReadFile = 34 + ErrIncompatibleVersion = 35 + ErrDisabled = 36 + ErrMalformedJson = 37 + ErrStartingUp = 38 + ErrDeserialize = 39 + ErrEndOfFile = 40 // HTTP error status codes - ErrHttpForbidden = 403 - ErrHttpInternal = 501 + ErrHttpBadParameter = 400 + ErrHttpUnauthorized = 401 + ErrHttpForbidden = 403 + ErrHttpNotFound = 404 + ErrHttpMethodNotAllowed = 405 + ErrHttpNotAcceptable = 406 + ErrHttpRequestTimeout = 408 + ErrHttpConflict = 409 + ErrHttpGone = 410 + ErrHttpPreconditionFailed = 412 + ErrHttpEnhanceYourCalm = 420 + ErrHttpServerError = 500 + ErrHttpNotImplemented = 501 + ErrHttpServiceUnavailable = 503 + ErrHttpGatewayTimeout = 504 + ErrHttpCorruptedJson = 600 + ErrHttpSuperfluousSuffices = 601 // Internal ArangoDB storage errors - ErrArangoReadOnly = 1004 + ErrArangoIllegalState = 1000 + ErrArangoReadOnly = 1004 + ErrArangoDuplicateIdentifier = 1005 // External ArangoDB storage errors ErrArangoCorruptedDatafile = 1100 ErrArangoIllegalParameterFile = 1101 ErrArangoCorruptedCollection = 1102 - ErrArangoFileSystemFull = 1104 - ErrArangoDataDirLocked = 1107 + ErrArangoFilesystemFull = 1104 + ErrArangoDatadirLocked = 1107 // General ArangoDB storage errors - ErrArangoConflict = 1200 - ErrArangoDocumentNotFound = 1202 - ErrArangoDataSourceNotFound = 1203 - ErrArangoIllegalName = 1208 - ErrArangoUniqueConstraintViolated = 1210 - ErrArangoDatabaseNotFound = 1228 - ErrArangoDatabaseNameInvalid = 1229 + ErrArangoConflict = 1200 + ErrArangoDocumentNotFound = 1202 + ErrArangoDataSourceNotFound = 1203 + ErrArangoCollectionParameterMissing = 1204 + ErrArangoDocumentHandleBad = 1205 + ErrArangoDuplicateName = 1207 + ErrArangoIllegalName = 1208 + ErrArangoNoIndex = 1209 + ErrArangoUniqueConstraintViolated = 1210 + ErrArangoIndexNotFound = 1212 + ErrArangoCrossCollectionRequest = 1213 + ErrArangoIndexHandleBad = 1214 + ErrArangoDocumentTooLarge = 1216 + ErrArangoCollectionTypeInvalid = 1218 + ErrArangoAttributeParserFailed = 1220 + ErrArangoDocumentKeyBad = 1221 + ErrArangoDocumentKeyUnexpected = 1222 + ErrArangoDatadirNotWritable = 1224 + ErrArangoOutOfKeys = 1225 + ErrArangoDocumentKeyMissing = 1226 + ErrArangoDocumentTypeInvalid = 1227 + ErrArangoDatabaseNotFound = 1228 + ErrArangoDatabaseNameInvalid = 1229 + ErrArangoUseSystemDatabase = 1230 + ErrArangoInvalidKeyGenerator = 1232 + ErrArangoInvalidEdgeAttribute = 1233 + ErrArangoIndexCreationFailed = 1235 + ErrArangoCollectionTypeMismatch = 1237 + ErrArangoCollectionNotLoaded = 1238 + ErrArangoDocumentRevBad = 1239 + ErrArangoIncompleteRead = 1240 + ErrArangoOldRocksdbFormat = 1241 + ErrArangoIndexHasLegacySortedKeys = 1242 + + ErrArangoEmptyDatadir = 1301 + ErrArangoTryAgain = 1302 + ErrArangoBusy = 1303 + ErrArangoMergeInProgress = 1304 + ErrArangoIoError = 1305 // ArangoDB cluster errors - ErrClusterReplicationWriteConcernNotFulfilled = 1429 - ErrClusterLeadershipChallengeOngoing = 1495 - ErrClusterNotLeader = 1496 + ErrReplicationNoResponse = 1400 + ErrReplicationInvalidResponse = 1401 + ErrReplicationLeaderError = 1402 + ErrReplicationLeaderIncompatible = 1403 + ErrReplicationLeaderChange = 1404 + ErrReplicationLoop = 1405 + ErrReplicationUnexpectedMarker = 1406 + ErrReplicationInvalidApplierState = 1407 + ErrReplicationUnexpectedTransaction = 1408 + ErrReplicationShardSyncAttemptTimeoutExceeded = 1409 + ErrReplicationInvalidApplierConfiguration = 1410 + ErrReplicationRunning = 1411 + ErrReplicationApplierStopped = 1412 + ErrReplicationNoStartTick = 1413 + ErrReplicationStartTickNotPresent = 1414 + ErrReplicationWrongChecksum = 1416 + ErrReplicationShardNonempty = 1417 + ErrReplicationReplicatedLogNotFound = 1418 + ErrReplicationReplicatedLogNotTheLeader = 1419 + ErrReplicationReplicatedLogNotAFollower = 1420 + ErrReplicationReplicatedLogAppendEntriesRejected = 1421 + ErrReplicationReplicatedLogLeaderResigned = 1422 + ErrReplicationReplicatedLogFollowerResigned = 1423 + ErrReplicationReplicatedLogParticipantGone = 1424 + ErrReplicationReplicatedLogInvalidTerm = 1425 + ErrReplicationReplicatedLogUnconfigured = 1426 + ErrReplicationReplicatedStateNotFound = 1427 + ErrReplicationReplicatedStateNotAvailable = 1428 + ErrReplicationWriteConcernNotFulfilled = 1429 + ErrReplicationReplicatedLogSubsequentFault = 1430 + ErrReplicationReplicatedStateImplementationNotFound = 1431 + ErrReplicationReplicatedWalError = 1432 + ErrReplicationReplicatedWalInvalidFile = 1433 + ErrReplicationReplicatedWalCorrupt = 1434 + ErrClusterNotFollower = 1446 + ErrClusterFollowerTransactionCommitPerformed = 1447 + ErrClusterCreateCollectionPreconditionFailed = 1448 + ErrClusterServerUnknown = 1449 + ErrClusterTooManyShards = 1450 + ErrClusterCouldNotCreateCollectionInPlan = 1454 + ErrClusterCouldNotCreateCollection = 1456 + ErrClusterTimeout = 1457 + ErrClusterCouldNotRemoveCollectionInPlan = 1458 + ErrClusterCouldNotCreateDatabaseInPlan = 1460 + ErrClusterCouldNotCreateDatabase = 1461 + ErrClusterCouldNotRemoveDatabaseInPlan = 1462 + ErrClusterCouldNotRemoveDatabaseInCurrent = 1463 + ErrClusterShardGone = 1464 + ErrClusterConnectionLost = 1465 + ErrClusterMustNotSpecifyKey = 1466 + ErrClusterGotContradictingAnswers = 1467 + ErrClusterNotAllShardingAttributesGiven = 1468 + ErrClusterMustNotChangeShardingAttributes = 1469 + ErrClusterUnsupported = 1470 + ErrClusterOnlyOnCoordinator = 1471 + ErrClusterReadingPlanAgency = 1472 + ErrClusterAqlCommunication = 1474 + ErrClusterOnlyOnDbserver = 1477 + ErrClusterBackendUnavailable = 1478 + ErrClusterAqlCollectionOutOfSync = 1481 + ErrClusterCouldNotCreateIndexInPlan = 1482 + ErrClusterCouldNotDropIndexInPlan = 1483 + ErrClusterChainOfDistributeshardslike = 1484 + ErrClusterMustNotDropCollOtherDistributeshardslike = 1485 + ErrClusterUnknownDistributeshardslike = 1486 + ErrClusterInsufficientDbservers = 1487 + ErrClusterCouldNotDropFollower = 1488 + ErrClusterShardLeaderRefusesReplication = 1489 + ErrClusterShardFollowerRefusesOperation = 1490 + ErrClusterShardLeaderResigned = 1491 + ErrClusterAgencyCommunicationFailed = 1492 + ErrClusterLeadershipChallengeOngoing = 1495 + ErrClusterNotLeader = 1496 + ErrClusterCouldNotCreateViewInPlan = 1497 + ErrClusterViewIdExists = 1498 + ErrClusterCouldNotDropCollection = 1499 + ErrQueryKilled = 1500 + ErrQueryParse = 1501 + ErrQueryEmpty = 1502 + ErrQueryScript = 1503 + ErrQueryNumberOutOfRange = 1504 + ErrQueryInvalidGeoValue = 1505 + ErrQueryVariableNameInvalid = 1510 + ErrQueryVariableRedeclared = 1511 + ErrQueryVariableNameUnknown = 1512 + ErrQueryCollectionLockFailed = 1521 + ErrQueryTooManyCollections = 1522 + ErrQueryTooMuchNesting = 1524 + ErrQueryInvalidOptionsAttribute = 1539 + ErrQueryFunctionNameUnknown = 1540 + ErrQueryFunctionArgumentNumberMismatch = 1541 + ErrQueryFunctionArgumentTypeMismatch = 1542 + ErrQueryInvalidRegex = 1543 + ErrQueryBindParametersInvalid = 1550 + ErrQueryBindParameterMissing = 1551 + ErrQueryBindParameterUndeclared = 1552 + ErrQueryBindParameterType = 1553 + ErrQueryVectorSearchNotApplied = 1554 + ErrQueryInvalidArithmeticValue = 1561 + ErrQueryDivisionByZero = 1562 + ErrQueryArrayExpected = 1563 + ErrQueryCollectionUsedInExpression = 1568 + ErrQueryFailCalled = 1569 + ErrQueryGeoIndexMissing = 1570 + ErrQueryFulltextIndexMissing = 1571 + ErrQueryInvalidDateValue = 1572 + ErrQueryMultiModify = 1573 + ErrQueryInvalidAggregateExpression = 1574 + ErrQueryCompileTimeOptions = 1575 + ErrQueryDnfComplexity = 1576 + ErrQueryForcedIndexHintUnusable = 1577 + ErrQueryDisallowedDynamicCall = 1578 + ErrQueryAccessAfterModification = 1579 + ErrQueryFunctionInvalidName = 1580 + ErrQueryFunctionInvalidCode = 1581 + ErrQueryFunctionNotFound = 1582 + ErrQueryFunctionRuntimeError = 1583 + ErrQueryNotEligibleForPlanCaching = 1584 + ErrQueryBadJsonPlan = 1590 + ErrQueryNotFound = 1591 + ErrQueryUserAssert = 1593 + ErrQueryUserWarn = 1594 + ErrQueryWindowAfterModification = 1595 + ErrCursorNotFound = 1600 + ErrCursorBusy = 1601 + ErrValidationFailed = 1620 + ErrValidationBadParameter = 1621 + ErrTransactionInternal = 1650 + ErrTransactionNested = 1651 + ErrTransactionUnregisteredCollection = 1652 + ErrTransactionDisallowedOperation = 1653 + ErrTransactionAborted = 1654 + ErrTransactionNotFound = 1655 // User management errors - ErrUserDuplicate = 1702 + ErrUserInvalidName = 1700 + ErrUserDuplicate = 1702 + ErrUserNotFound = 1703 + ErrUserExternal = 1705 + ErrServiceDownloadFailed = 1752 + ErrServiceUploadFailed = 1753 + ErrTaskInvalidId = 1850 + ErrTaskDuplicateId = 1851 + ErrTaskNotFound = 1852 + ErrGraphInvalidGraph = 1901 + ErrGraphInvalidEdge = 1906 + ErrGraphInvalidFilterResult = 1910 + ErrGraphCollectionMultiUse = 1920 + ErrGraphCollectionUseInMultiGraphs = 1921 + ErrGraphCreateMissingName = 1922 + ErrGraphCreateMalformedEdgeDefinition = 1923 + ErrGraphNotFound = 1924 + ErrGraphDuplicate = 1925 + ErrGraphVertexColDoesNotExist = 1926 + ErrGraphWrongCollectionTypeVertex = 1927 + ErrGraphNotInOrphanCollection = 1928 + ErrGraphCollectionUsedInEdgeDef = 1929 + ErrGraphEdgeCollectionNotUsed = 1930 + ErrGraphNoGraphCollection = 1932 + ErrGraphInvalidNumberOfArguments = 1935 + ErrGraphInvalidParameter = 1936 + ErrGraphCollectionUsedInOrphans = 1938 + ErrGraphEdgeColDoesNotExist = 1939 + ErrGraphEmpty = 1940 + ErrGraphInternalDataCorrupt = 1941 + ErrGraphMustNotDropCollection = 1942 + ErrGraphCreateMalformedOrphanList = 1943 + ErrGraphEdgeDefinitionIsDocument = 1944 + ErrGraphCollectionIsInitial = 1945 + ErrGraphNoInitialCollection = 1946 + ErrGraphReferencedVertexCollectionNotPartOfTheGraph = 1947 + ErrGraphNegativeEdgeWeight = 1948 + ErrGraphCollectionNotPartOfTheGraph = 1949 + ErrSessionUnknown = 1950 + ErrSessionExpired = 1951 + ErrSimpleClientUnknownError = 2000 + ErrSimpleClientCouldNotConnect = 2001 + ErrSimpleClientCouldNotWrite = 2002 + ErrSimpleClientCouldNotRead = 2003 + ErrWasErlaube = 2019 + ErrInternalAql = 2200 + ErrMalformedManifestFile = 3000 + ErrInvalidServiceManifest = 3001 + ErrServiceFilesMissing = 3002 + ErrServiceFilesOutdated = 3003 + ErrInvalidFoxxOptions = 3004 + ErrInvalidMountpoint = 3007 + ErrServiceNotFound = 3009 + ErrServiceNeedsConfiguration = 3010 + ErrServiceMountpointConflict = 3011 + ErrServiceManifestNotFound = 3012 + ErrServiceOptionsMalformed = 3013 + ErrServiceSourceNotFound = 3014 + ErrServiceSourceError = 3015 + ErrServiceUnknownScript = 3016 + ErrServiceApiDisabled = 3099 + ErrModuleNotFound = 3100 + ErrModuleSyntaxError = 3101 + ErrModuleFailure = 3103 + ErrNoSmartCollection = 4000 + ErrNoSmartGraphAttribute = 4001 + ErrCannotDropSmartCollection = 4002 + ErrKeyMustBePrefixedWithSmartGraphAttribute = 4003 + ErrIllegalSmartGraphAttribute = 4004 + ErrSmartGraphAttributeMismatch = 4005 + ErrInvalidSmartJoinAttribute = 4006 + ErrKeyMustBePrefixedWithSmartJoinAttribute = 4007 + ErrNoSmartJoinAttribute = 4008 + ErrClusterMustNotChangeSmartJoinAttribute = 4009 + ErrInvalidDisjointSmartEdge = 4010 + ErrUnsupportedChangeInSmartToSatelliteDisjointEdgeDirection = 4011 + ErrAgencyMalformedGossipMessage = 20001 + ErrAgencyMalformedInquireRequest = 20002 + ErrAgencyInformMustBeObject = 20011 + ErrAgencyInformMustContainTerm = 20012 + ErrAgencyInformMustContainId = 20013 + ErrAgencyInformMustContainActive = 20014 + ErrAgencyInformMustContainPool = 20015 + ErrAgencyInformMustContainMinPing = 20016 + ErrAgencyInformMustContainMaxPing = 20017 + ErrAgencyInformMustContainTimeoutMult = 20018 + ErrAgencyCannotRebuildDbs = 20021 + ErrAgencyMalformedTransaction = 20030 + ErrSupervisionGeneralFailure = 20501 + ErrQueueFull = 21003 + ErrQueueTimeRequirementViolated = 21004 + ErrTooManyDetachedThreads = 21005 + ErrActionUnfinished = 6003 + ErrHotBackupInternal = 7001 + ErrHotRestoreInternal = 7002 + ErrBackupTopology = 7003 + ErrNoSpaceLeftOnDevice = 7004 + ErrFailedToUploadBackup = 7005 + ErrFailedToDownloadBackup = 7006 + ErrNoSuchHotBackup = 7007 + ErrRemoteRepositoryConfigBad = 7008 + ErrLocalLockFailed = 7009 + ErrLocalLockRetry = 7010 + ErrHotBackupConflict = 7011 + ErrHotBackupDbserversAwol = 7012 + ErrClusterCouldNotModifyAnalyzersInPlan = 7021 + ErrLicenseExpiredOrInvalid = 9001 + ErrLicenseSignatureVerification = 9002 + ErrLicenseNonMatchingId = 9003 + ErrLicenseFeatureNotEnabled = 9004 + ErrLicenseResourceExhausted = 9005 + ErrLicenseInvalid = 9006 + ErrLicenseConflict = 9007 + ErrLicenseValidationFailed = 9008 ) // ArangoError is a Go error with arangodb specific error information. @@ -204,8 +530,8 @@ func IsExternalStorageError(err error) bool { ErrArangoCorruptedDatafile, ErrArangoIllegalParameterFile, ErrArangoCorruptedCollection, - ErrArangoFileSystemFull, - ErrArangoDataDirLocked, + ErrArangoFilesystemFull, + ErrArangoDatadirLocked, ) } From 092ad6503847ab667934e55f5c2ab4fe394b9ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Mon, 24 Mar 2025 12:18:48 +0000 Subject: [PATCH 2/7] Updated error codes for v1 --- client_impl.go | 2 +- error.go | 368 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 348 insertions(+), 22 deletions(-) diff --git a/client_impl.go b/client_impl.go index 14cf3621..868f599f 100644 --- a/client_impl.go +++ b/client_impl.go @@ -85,7 +85,7 @@ func (c *client) SynchronizeEndpoints2(ctx context.Context, dbname string) error cep, err := c.clusterEndpoints(ctx, dbname) if err != nil { // ignore Forbidden: automatic failover is not enabled errors - if !IsArangoErrorWithErrorNum(err, ErrHttpForbidden, ErrHttpInternal, 0, ErrNotImplemented, ErrForbidden) { + if !IsArangoErrorWithErrorNum(err, ErrHttpForbidden, ErrHttpNotImplemented, 0, ErrNotImplemented, ErrForbidden) { // 3.2 returns no error code, thus check for 0 // 501 with ErrorNum 9 is in there since 3.7, earlier versions returned 403 and ErrorNum 11. return WithStack(err) diff --git a/error.go b/error.go index 634e8d76..893e1ca6 100644 --- a/error.go +++ b/error.go @@ -33,40 +33,366 @@ import ( const ( // general errors - ErrNotImplemented = 9 - ErrForbidden = 11 - ErrDisabled = 36 + ErrNoError = 0 + ErrFailed = 1 + ErrSysError = 2 + ErrOutOfMemory = 3 + ErrInternal = 4 + ErrIllegalNumber = 5 + ErrNumericOverflow = 6 + ErrIllegalOption = 7 + ErrDeadPid = 8 + ErrNotImplemented = 9 + ErrBadParameter = 10 + ErrForbidden = 11 + ErrCorruptedCsv = 13 + ErrFileNotFound = 14 + ErrCannotWriteFile = 15 + ErrCannotOverwriteFile = 16 + ErrTypeError = 17 + ErrLockTimeout = 18 + ErrCannotCreateDirectory = 19 + ErrCannotCreateTempFile = 20 + ErrRequestCanceled = 21 + ErrDebug = 22 + ErrIpAddressInvalid = 25 + ErrFileExists = 27 + ErrLocked = 28 + ErrDeadlock = 29 + ErrShuttingDown = 30 + ErrOnlyEnterprise = 31 + ErrResourceLimit = 32 + ErrArangoIcuError = 33 + ErrCannotReadFile = 34 + ErrIncompatibleVersion = 35 + ErrDisabled = 36 + ErrMalformedJson = 37 + ErrStartingUp = 38 + ErrDeserialize = 39 + ErrEndOfFile = 40 // HTTP error status codes - ErrHttpForbidden = 403 - ErrHttpInternal = 501 + ErrHttpBadParameter = 400 + ErrHttpUnauthorized = 401 + ErrHttpForbidden = 403 + ErrHttpNotFound = 404 + ErrHttpMethodNotAllowed = 405 + ErrHttpNotAcceptable = 406 + ErrHttpRequestTimeout = 408 + ErrHttpConflict = 409 + ErrHttpGone = 410 + ErrHttpPreconditionFailed = 412 + ErrHttpEnhanceYourCalm = 420 + ErrHttpServerError = 500 + ErrHttpNotImplemented = 501 + ErrHttpServiceUnavailable = 503 + ErrHttpGatewayTimeout = 504 + ErrHttpCorruptedJson = 600 + ErrHttpSuperfluousSuffices = 601 // Internal ArangoDB storage errors - ErrArangoReadOnly = 1004 + ErrArangoIllegalState = 1000 + ErrArangoReadOnly = 1004 + ErrArangoDuplicateIdentifier = 1005 // External ArangoDB storage errors ErrArangoCorruptedDatafile = 1100 ErrArangoIllegalParameterFile = 1101 ErrArangoCorruptedCollection = 1102 - ErrArangoFileSystemFull = 1104 - ErrArangoDataDirLocked = 1107 + ErrArangoFilesystemFull = 1104 + ErrArangoDatadirLocked = 1107 // General ArangoDB storage errors - ErrArangoConflict = 1200 - ErrArangoDocumentNotFound = 1202 - ErrArangoDataSourceNotFound = 1203 - ErrArangoIllegalName = 1208 - ErrArangoUniqueConstraintViolated = 1210 - ErrArangoDatabaseNotFound = 1228 - ErrArangoDatabaseNameInvalid = 1229 + ErrArangoConflict = 1200 + ErrArangoDocumentNotFound = 1202 + ErrArangoDataSourceNotFound = 1203 + ErrArangoCollectionParameterMissing = 1204 + ErrArangoDocumentHandleBad = 1205 + ErrArangoDuplicateName = 1207 + ErrArangoIllegalName = 1208 + ErrArangoNoIndex = 1209 + ErrArangoUniqueConstraintViolated = 1210 + ErrArangoIndexNotFound = 1212 + ErrArangoCrossCollectionRequest = 1213 + ErrArangoIndexHandleBad = 1214 + ErrArangoDocumentTooLarge = 1216 + ErrArangoCollectionTypeInvalid = 1218 + ErrArangoAttributeParserFailed = 1220 + ErrArangoDocumentKeyBad = 1221 + ErrArangoDocumentKeyUnexpected = 1222 + ErrArangoDatadirNotWritable = 1224 + ErrArangoOutOfKeys = 1225 + ErrArangoDocumentKeyMissing = 1226 + ErrArangoDocumentTypeInvalid = 1227 + ErrArangoDatabaseNotFound = 1228 + ErrArangoDatabaseNameInvalid = 1229 + ErrArangoUseSystemDatabase = 1230 + ErrArangoInvalidKeyGenerator = 1232 + ErrArangoInvalidEdgeAttribute = 1233 + ErrArangoIndexCreationFailed = 1235 + ErrArangoCollectionTypeMismatch = 1237 + ErrArangoCollectionNotLoaded = 1238 + ErrArangoDocumentRevBad = 1239 + ErrArangoIncompleteRead = 1240 + ErrArangoOldRocksdbFormat = 1241 + ErrArangoIndexHasLegacySortedKeys = 1242 + + ErrArangoEmptyDatadir = 1301 + ErrArangoTryAgain = 1302 + ErrArangoBusy = 1303 + ErrArangoMergeInProgress = 1304 + ErrArangoIoError = 1305 // ArangoDB cluster errors - ErrClusterReplicationWriteConcernNotFulfilled = 1429 - ErrClusterLeadershipChallengeOngoing = 1495 - ErrClusterNotLeader = 1496 + ErrReplicationNoResponse = 1400 + ErrReplicationInvalidResponse = 1401 + ErrReplicationLeaderError = 1402 + ErrReplicationLeaderIncompatible = 1403 + ErrReplicationLeaderChange = 1404 + ErrReplicationLoop = 1405 + ErrReplicationUnexpectedMarker = 1406 + ErrReplicationInvalidApplierState = 1407 + ErrReplicationUnexpectedTransaction = 1408 + ErrReplicationShardSyncAttemptTimeoutExceeded = 1409 + ErrReplicationInvalidApplierConfiguration = 1410 + ErrReplicationRunning = 1411 + ErrReplicationApplierStopped = 1412 + ErrReplicationNoStartTick = 1413 + ErrReplicationStartTickNotPresent = 1414 + ErrReplicationWrongChecksum = 1416 + ErrReplicationShardNonempty = 1417 + ErrReplicationReplicatedLogNotFound = 1418 + ErrReplicationReplicatedLogNotTheLeader = 1419 + ErrReplicationReplicatedLogNotAFollower = 1420 + ErrReplicationReplicatedLogAppendEntriesRejected = 1421 + ErrReplicationReplicatedLogLeaderResigned = 1422 + ErrReplicationReplicatedLogFollowerResigned = 1423 + ErrReplicationReplicatedLogParticipantGone = 1424 + ErrReplicationReplicatedLogInvalidTerm = 1425 + ErrReplicationReplicatedLogUnconfigured = 1426 + ErrReplicationReplicatedStateNotFound = 1427 + ErrReplicationReplicatedStateNotAvailable = 1428 + ErrReplicationWriteConcernNotFulfilled = 1429 + ErrReplicationReplicatedLogSubsequentFault = 1430 + ErrReplicationReplicatedStateImplementationNotFound = 1431 + ErrReplicationReplicatedWalError = 1432 + ErrReplicationReplicatedWalInvalidFile = 1433 + ErrReplicationReplicatedWalCorrupt = 1434 + ErrClusterNotFollower = 1446 + ErrClusterFollowerTransactionCommitPerformed = 1447 + ErrClusterCreateCollectionPreconditionFailed = 1448 + ErrClusterServerUnknown = 1449 + ErrClusterTooManyShards = 1450 + ErrClusterCouldNotCreateCollectionInPlan = 1454 + ErrClusterCouldNotCreateCollection = 1456 + ErrClusterTimeout = 1457 + ErrClusterCouldNotRemoveCollectionInPlan = 1458 + ErrClusterCouldNotCreateDatabaseInPlan = 1460 + ErrClusterCouldNotCreateDatabase = 1461 + ErrClusterCouldNotRemoveDatabaseInPlan = 1462 + ErrClusterCouldNotRemoveDatabaseInCurrent = 1463 + ErrClusterShardGone = 1464 + ErrClusterConnectionLost = 1465 + ErrClusterMustNotSpecifyKey = 1466 + ErrClusterGotContradictingAnswers = 1467 + ErrClusterNotAllShardingAttributesGiven = 1468 + ErrClusterMustNotChangeShardingAttributes = 1469 + ErrClusterUnsupported = 1470 + ErrClusterOnlyOnCoordinator = 1471 + ErrClusterReadingPlanAgency = 1472 + ErrClusterAqlCommunication = 1474 + ErrClusterOnlyOnDbserver = 1477 + ErrClusterBackendUnavailable = 1478 + ErrClusterAqlCollectionOutOfSync = 1481 + ErrClusterCouldNotCreateIndexInPlan = 1482 + ErrClusterCouldNotDropIndexInPlan = 1483 + ErrClusterChainOfDistributeshardslike = 1484 + ErrClusterMustNotDropCollOtherDistributeshardslike = 1485 + ErrClusterUnknownDistributeshardslike = 1486 + ErrClusterInsufficientDbservers = 1487 + ErrClusterCouldNotDropFollower = 1488 + ErrClusterShardLeaderRefusesReplication = 1489 + ErrClusterShardFollowerRefusesOperation = 1490 + ErrClusterShardLeaderResigned = 1491 + ErrClusterAgencyCommunicationFailed = 1492 + ErrClusterLeadershipChallengeOngoing = 1495 + ErrClusterNotLeader = 1496 + ErrClusterCouldNotCreateViewInPlan = 1497 + ErrClusterViewIdExists = 1498 + ErrClusterCouldNotDropCollection = 1499 + ErrQueryKilled = 1500 + ErrQueryParse = 1501 + ErrQueryEmpty = 1502 + ErrQueryScript = 1503 + ErrQueryNumberOutOfRange = 1504 + ErrQueryInvalidGeoValue = 1505 + ErrQueryVariableNameInvalid = 1510 + ErrQueryVariableRedeclared = 1511 + ErrQueryVariableNameUnknown = 1512 + ErrQueryCollectionLockFailed = 1521 + ErrQueryTooManyCollections = 1522 + ErrQueryTooMuchNesting = 1524 + ErrQueryInvalidOptionsAttribute = 1539 + ErrQueryFunctionNameUnknown = 1540 + ErrQueryFunctionArgumentNumberMismatch = 1541 + ErrQueryFunctionArgumentTypeMismatch = 1542 + ErrQueryInvalidRegex = 1543 + ErrQueryBindParametersInvalid = 1550 + ErrQueryBindParameterMissing = 1551 + ErrQueryBindParameterUndeclared = 1552 + ErrQueryBindParameterType = 1553 + ErrQueryVectorSearchNotApplied = 1554 + ErrQueryInvalidArithmeticValue = 1561 + ErrQueryDivisionByZero = 1562 + ErrQueryArrayExpected = 1563 + ErrQueryCollectionUsedInExpression = 1568 + ErrQueryFailCalled = 1569 + ErrQueryGeoIndexMissing = 1570 + ErrQueryFulltextIndexMissing = 1571 + ErrQueryInvalidDateValue = 1572 + ErrQueryMultiModify = 1573 + ErrQueryInvalidAggregateExpression = 1574 + ErrQueryCompileTimeOptions = 1575 + ErrQueryDnfComplexity = 1576 + ErrQueryForcedIndexHintUnusable = 1577 + ErrQueryDisallowedDynamicCall = 1578 + ErrQueryAccessAfterModification = 1579 + ErrQueryFunctionInvalidName = 1580 + ErrQueryFunctionInvalidCode = 1581 + ErrQueryFunctionNotFound = 1582 + ErrQueryFunctionRuntimeError = 1583 + ErrQueryNotEligibleForPlanCaching = 1584 + ErrQueryBadJsonPlan = 1590 + ErrQueryNotFound = 1591 + ErrQueryUserAssert = 1593 + ErrQueryUserWarn = 1594 + ErrQueryWindowAfterModification = 1595 + ErrCursorNotFound = 1600 + ErrCursorBusy = 1601 + ErrValidationFailed = 1620 + ErrValidationBadParameter = 1621 + ErrTransactionInternal = 1650 + ErrTransactionNested = 1651 + ErrTransactionUnregisteredCollection = 1652 + ErrTransactionDisallowedOperation = 1653 + ErrTransactionAborted = 1654 + ErrTransactionNotFound = 1655 // User management errors - ErrUserDuplicate = 1702 + ErrUserInvalidName = 1700 + ErrUserDuplicate = 1702 + ErrUserNotFound = 1703 + ErrUserExternal = 1705 + ErrServiceDownloadFailed = 1752 + ErrServiceUploadFailed = 1753 + ErrTaskInvalidId = 1850 + ErrTaskDuplicateId = 1851 + ErrTaskNotFound = 1852 + ErrGraphInvalidGraph = 1901 + ErrGraphInvalidEdge = 1906 + ErrGraphInvalidFilterResult = 1910 + ErrGraphCollectionMultiUse = 1920 + ErrGraphCollectionUseInMultiGraphs = 1921 + ErrGraphCreateMissingName = 1922 + ErrGraphCreateMalformedEdgeDefinition = 1923 + ErrGraphNotFound = 1924 + ErrGraphDuplicate = 1925 + ErrGraphVertexColDoesNotExist = 1926 + ErrGraphWrongCollectionTypeVertex = 1927 + ErrGraphNotInOrphanCollection = 1928 + ErrGraphCollectionUsedInEdgeDef = 1929 + ErrGraphEdgeCollectionNotUsed = 1930 + ErrGraphNoGraphCollection = 1932 + ErrGraphInvalidNumberOfArguments = 1935 + ErrGraphInvalidParameter = 1936 + ErrGraphCollectionUsedInOrphans = 1938 + ErrGraphEdgeColDoesNotExist = 1939 + ErrGraphEmpty = 1940 + ErrGraphInternalDataCorrupt = 1941 + ErrGraphMustNotDropCollection = 1942 + ErrGraphCreateMalformedOrphanList = 1943 + ErrGraphEdgeDefinitionIsDocument = 1944 + ErrGraphCollectionIsInitial = 1945 + ErrGraphNoInitialCollection = 1946 + ErrGraphReferencedVertexCollectionNotPartOfTheGraph = 1947 + ErrGraphNegativeEdgeWeight = 1948 + ErrGraphCollectionNotPartOfTheGraph = 1949 + ErrSessionUnknown = 1950 + ErrSessionExpired = 1951 + ErrSimpleClientUnknownError = 2000 + ErrSimpleClientCouldNotConnect = 2001 + ErrSimpleClientCouldNotWrite = 2002 + ErrSimpleClientCouldNotRead = 2003 + ErrWasErlaube = 2019 + ErrInternalAql = 2200 + ErrMalformedManifestFile = 3000 + ErrInvalidServiceManifest = 3001 + ErrServiceFilesMissing = 3002 + ErrServiceFilesOutdated = 3003 + ErrInvalidFoxxOptions = 3004 + ErrInvalidMountpoint = 3007 + ErrServiceNotFound = 3009 + ErrServiceNeedsConfiguration = 3010 + ErrServiceMountpointConflict = 3011 + ErrServiceManifestNotFound = 3012 + ErrServiceOptionsMalformed = 3013 + ErrServiceSourceNotFound = 3014 + ErrServiceSourceError = 3015 + ErrServiceUnknownScript = 3016 + ErrServiceApiDisabled = 3099 + ErrModuleNotFound = 3100 + ErrModuleSyntaxError = 3101 + ErrModuleFailure = 3103 + ErrNoSmartCollection = 4000 + ErrNoSmartGraphAttribute = 4001 + ErrCannotDropSmartCollection = 4002 + ErrKeyMustBePrefixedWithSmartGraphAttribute = 4003 + ErrIllegalSmartGraphAttribute = 4004 + ErrSmartGraphAttributeMismatch = 4005 + ErrInvalidSmartJoinAttribute = 4006 + ErrKeyMustBePrefixedWithSmartJoinAttribute = 4007 + ErrNoSmartJoinAttribute = 4008 + ErrClusterMustNotChangeSmartJoinAttribute = 4009 + ErrInvalidDisjointSmartEdge = 4010 + ErrUnsupportedChangeInSmartToSatelliteDisjointEdgeDirection = 4011 + ErrAgencyMalformedGossipMessage = 20001 + ErrAgencyMalformedInquireRequest = 20002 + ErrAgencyInformMustBeObject = 20011 + ErrAgencyInformMustContainTerm = 20012 + ErrAgencyInformMustContainId = 20013 + ErrAgencyInformMustContainActive = 20014 + ErrAgencyInformMustContainPool = 20015 + ErrAgencyInformMustContainMinPing = 20016 + ErrAgencyInformMustContainMaxPing = 20017 + ErrAgencyInformMustContainTimeoutMult = 20018 + ErrAgencyCannotRebuildDbs = 20021 + ErrAgencyMalformedTransaction = 20030 + ErrSupervisionGeneralFailure = 20501 + ErrQueueFull = 21003 + ErrQueueTimeRequirementViolated = 21004 + ErrTooManyDetachedThreads = 21005 + ErrActionUnfinished = 6003 + ErrHotBackupInternal = 7001 + ErrHotRestoreInternal = 7002 + ErrBackupTopology = 7003 + ErrNoSpaceLeftOnDevice = 7004 + ErrFailedToUploadBackup = 7005 + ErrFailedToDownloadBackup = 7006 + ErrNoSuchHotBackup = 7007 + ErrRemoteRepositoryConfigBad = 7008 + ErrLocalLockFailed = 7009 + ErrLocalLockRetry = 7010 + ErrHotBackupConflict = 7011 + ErrHotBackupDbserversAwol = 7012 + ErrClusterCouldNotModifyAnalyzersInPlan = 7021 + ErrLicenseExpiredOrInvalid = 9001 + ErrLicenseSignatureVerification = 9002 + ErrLicenseNonMatchingId = 9003 + ErrLicenseFeatureNotEnabled = 9004 + ErrLicenseResourceExhausted = 9005 + ErrLicenseInvalid = 9006 + ErrLicenseConflict = 9007 + ErrLicenseValidationFailed = 9008 ) // ArangoError is a Go error with arangodb specific error information. @@ -185,8 +511,8 @@ func IsExternalStorageError(err error) bool { ErrArangoCorruptedDatafile, ErrArangoIllegalParameterFile, ErrArangoCorruptedCollection, - ErrArangoFileSystemFull, - ErrArangoDataDirLocked, + ErrArangoFilesystemFull, + ErrArangoDatadirLocked, ) } From 9d195fcad619e0249f379e6596ea6511475b2000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Tue, 25 Mar 2025 09:39:47 +0000 Subject: [PATCH 3/7] Update Go Toolkit --- .circleci/config.yml | 4 ++-- Makefile | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 72fd87e5..38f14b2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,13 +19,13 @@ aliases: parameters: goImage: type: string - default: "gcr.io/gcr-for-testing/golang:1.22.6" + default: "gcr.io/gcr-for-testing/golang:1.22.12" arangodbImage: type: string default: "gcr.io/gcr-for-testing/arangodb/enterprise-preview:devel-nightly" alpineImage: type: string - default: "gcr.io/gcr-for-testing/alpine:3.17" + default: "gcr.io/gcr-for-testing/alpine:3.21" starterImage: type: string default: "arangodb/arangodb-starter:latest" diff --git a/Makefile b/Makefile index d3a09f9e..e6fa4e87 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ CURR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) ROOTDIR:=$(CURR) GOVERSION ?= 1.22.12 +GOTOOLCHAIN ?= 1.24.1 GOIMAGE ?= golang:$(GOVERSION) GOV2IMAGE ?= $(GOIMAGE) ALPINE_IMAGE ?= alpine:3.17 @@ -186,6 +187,7 @@ run-unit-tests: run-v2-unit-tests --rm \ -v "${ROOTDIR}":/usr/code \ -e CGO_ENABLED=$(CGO_ENABLED) \ + -e GOTOOLCHAIN=$(GOTOOLCHAIN) \ -w /usr/code/ \ $(GOIMAGE) \ go test $(TESTOPTIONS) $(REPOPATH) $(REPOPATH)/http $(REPOPATH)/agency $(REPOPATH)/vst/protocol From f314dcf0020ce850d89206e20d81c713b37b80f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Tue, 25 Mar 2025 10:32:33 +0000 Subject: [PATCH 4/7] Update config --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 38f14b2d..1c8949e9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,6 +20,9 @@ parameters: goImage: type: string default: "gcr.io/gcr-for-testing/golang:1.22.12" + goToolchain: + type: string + default: go1.24.1+auto arangodbImage: type: string default: "gcr.io/gcr-for-testing/arangodb/enterprise-preview:devel-nightly" From f13a482653e4db972173db29d3b0c0c63f1605d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Tue, 25 Mar 2025 11:19:53 +0000 Subject: [PATCH 5/7] Updated GoToolChain --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e6fa4e87..79a4b611 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CURR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) ROOTDIR:=$(CURR) GOVERSION ?= 1.22.12 -GOTOOLCHAIN ?= 1.24.1 +GOTOOLCHAIN ?= go1.24.1 GOIMAGE ?= golang:$(GOVERSION) GOV2IMAGE ?= $(GOIMAGE) ALPINE_IMAGE ?= alpine:3.17 From d371683a9621016c8f92df926461f6de7180374b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Tue, 25 Mar 2025 12:14:53 +0000 Subject: [PATCH 6/7] Add Go Tool Chain to v2 tests as well --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 79a4b611..6742254c 100644 --- a/Makefile +++ b/Makefile @@ -197,6 +197,7 @@ run-v2-unit-tests: --rm \ -v "${ROOTDIR}"/v2:/usr/code \ -e CGO_ENABLED=$(CGO_ENABLED) \ + -e GOTOOLCHAIN=$(GOTOOLCHAIN) \ -w /usr/code/ \ $(GOIMAGE) \ go test $(TESTOPTIONS) $(REPOPATH)/v2/connection $(REPOPATH)/v2/arangodb/... @@ -422,7 +423,8 @@ COMMON_DOCKER_CMD_PARAMS = \ -e TEST_ENABLE_SHUTDOWN=$(TEST_ENABLE_SHUTDOWN) \ -e ENABLE_DATABASE_EXTRA_FEATURES=$(ENABLE_DATABASE_EXTRA_FEATURES) \ -e GODEBUG=tls13=1 \ - -e CGO_ENABLED=$(CGO_ENABLED) + -e CGO_ENABLED=$(CGO_ENABLED) \ + -e GOTOOLCHAIN=$(GOTOOLCHAIN) # Internal test tasks From bdc5c5b51e424dd925d44652bf112a876cd120f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Kmie=C4=87?= Date: Wed, 26 Mar 2025 08:02:39 +0000 Subject: [PATCH 7/7] Downgrade toolchain to 1.23 --- .circleci/config.yml | 3 --- Makefile | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c8949e9..38f14b2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,9 +20,6 @@ parameters: goImage: type: string default: "gcr.io/gcr-for-testing/golang:1.22.12" - goToolchain: - type: string - default: go1.24.1+auto arangodbImage: type: string default: "gcr.io/gcr-for-testing/arangodb/enterprise-preview:devel-nightly" diff --git a/Makefile b/Makefile index 6742254c..2368ffab 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CURR=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) ROOTDIR:=$(CURR) GOVERSION ?= 1.22.12 -GOTOOLCHAIN ?= go1.24.1 +GOTOOLCHAIN ?= go1.23.0 GOIMAGE ?= golang:$(GOVERSION) GOV2IMAGE ?= $(GOIMAGE) ALPINE_IMAGE ?= alpine:3.17