github.com/vchain-us/vcn@v0.9.11-0.20210921212052-a2484d23c0b3/pkg/api/error.go (about) 1 /* 2 * Copyright (c) 2018-2020 vChain, Inc. All Rights Reserved. 3 * This software is released under GPL3. 4 * The full license information can be found under: 5 * https://www.gnu.org/licenses/gpl-3.0.en.html 6 * 7 */ 8 9 package api 10 11 import "fmt" 12 13 // ErrNotVerified is returned when an artifact is not verified on CNLC 14 var ErrNotVerified = fmt.Errorf("artifact is not verified") 15 16 // ErrNotVerified is returned when an artifact is not found on CNLC 17 var ErrNotFound = fmt.Errorf("artifact is not found") 18 19 // Error represents a CodeNotary platform's API returned error. 20 type Error struct { 21 Description string `json:"description"` 22 Status int `json:"status"` 23 Message string `json:"message"` 24 Path string `json:"path"` 25 Timestamp string `json:"timestamp"` 26 Error string `json:"error"` 27 FieldErrors []string `json:"fieldErrors"` 28 }