-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return checkeable error for missing items.
- Loading branch information
1 parent
b4242fe
commit b0772e3
Showing
3 changed files
with
41 additions
and
5 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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package directus | ||
|
||
import ( | ||
"errors" | ||
"fmt" | ||
"net/url" | ||
) | ||
|
||
var ( | ||
ErrItemNotFound = errors.New("directus: item not found") | ||
) | ||
|
||
type unexpectedStatusError struct { | ||
status int | ||
url *url.URL | ||
} | ||
|
||
func (e *unexpectedStatusError) Error() string { | ||
return fmt.Sprintf("directus: unexpected status code %v for url %q", e.status, e.url.String()) | ||
} |