-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle additional errors as permanent (#240)
* update version * Fix issue #241 * Handle "content not found" error
- Loading branch information
Showing
4 changed files
with
37 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ingest | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
type adIngestState string | ||
|
||
type adIngestError struct { | ||
state adIngestState | ||
err error | ||
} | ||
|
||
const ( | ||
adIngestIndexerErr adIngestState = "indexerErr" | ||
adIngestDecodingErr adIngestState = "decodingErr" | ||
adIngestMalformedErr adIngestState = "malformedErr" | ||
adIngestRegisterProviderErr adIngestState = "registerErr" | ||
adIngestSyncEntriesErr adIngestState = "syncEntriesErr" | ||
adIngestContentNotFound adIngestState = "contentNotFound" | ||
// Happens if there is an error during ingest of an entry chunk (rather than fetching it). | ||
adIngestEntryChunkErr adIngestState = "ingestEntryChunkErr" | ||
) | ||
|
||
func (e adIngestError) Error() string { | ||
return fmt.Sprintf("%s: %s", e.state, e.err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "v0.3.4" | ||
"version": "v0.3.5" | ||
} |