go.temporal.io/server@v1.23.0/common/archiver/constants.go (about) 1 // The MIT License 2 // 3 // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved. 4 // 5 // Copyright (c) 2020 Uber Technologies, Inc. 6 // 7 // Permission is hereby granted, free of charge, to any person obtaining a copy 8 // of this software and associated documentation files (the "Software"), to deal 9 // in the Software without restriction, including without limitation the rights 10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 // copies of the Software, and to permit persons to whom the Software is 12 // furnished to do so, subject to the following conditions: 13 // 14 // The above copyright notice and this permission notice shall be included in 15 // all copies or substantial portions of the Software. 16 // 17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 // THE SOFTWARE. 24 25 package archiver 26 27 import ( 28 "errors" 29 ) 30 31 const ( 32 // ArchiveNonRetryableErrorMsg is the log message when the Archive() method encounters a non-retryable error 33 ArchiveNonRetryableErrorMsg = "Archive method encountered an non-retryable error." 34 // ArchiveTransientErrorMsg is the log message when the Archive() method encounters a transient error 35 ArchiveTransientErrorMsg = "Archive method encountered a transient error." 36 // ArchiveSkippedInfoMsg is the log messsage when the Archive() method encounter an not found error 37 ArchiveSkippedInfoMsg = "Archive method encountered not found error and skipped the archival" 38 39 // ErrReasonInvalidURI is the error reason for invalid URI 40 ErrReasonInvalidURI = "URI is invalid" 41 // ErrReasonInvalidArchiveRequest is the error reason for invalid archive request 42 ErrReasonInvalidArchiveRequest = "archive request is invalid" 43 // ErrReasonConstructHistoryIterator is the error reason for failing to construct history iterator 44 ErrReasonConstructHistoryIterator = "failed to construct history iterator" 45 // ErrReasonReadHistory is the error reason for failing to read history 46 ErrReasonReadHistory = "failed to read history batches" 47 // ErrReasonHistoryMutated is the error reason for mutated history 48 ErrReasonHistoryMutated = "history was mutated" 49 ) 50 51 var ( 52 // ErrInvalidURI is the error for invalid URI 53 ErrInvalidURI = errors.New("URI is invalid") 54 // ErrURISchemeMismatch is the error for mismatch between URI scheme and archiver 55 ErrURISchemeMismatch = errors.New("URI scheme does not match the archiver") 56 // ErrHistoryMutated is the error for mutated history 57 ErrHistoryMutated = errors.New("history was mutated") 58 // ErrContextTimeout is the error for context timeout 59 ErrContextTimeout = errors.New("archive aborted because context timed out") 60 // ErrInvalidGetHistoryRequest is the error for invalid GetHistory request 61 ErrInvalidGetHistoryRequest = errors.New("get archived history request is invalid") 62 // ErrInvalidQueryVisibilityRequest is the error for invalid Query Visibility request 63 ErrInvalidQueryVisibilityRequest = errors.New("query visiblity request is invalid") 64 // ErrNextPageTokenCorrupted is the error for corrupted GetHistory token 65 ErrNextPageTokenCorrupted = errors.New("next page token is corrupted") 66 // ErrHistoryNotExist is the error for non-exist history 67 ErrHistoryNotExist = errors.New("requested workflow history does not exist") 68 )