We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa64c58 commit b33e7f6Copy full SHA for b33e7f6
coderd/database/dbauthz/dbauthz.go
@@ -34,8 +34,8 @@ func (e NotAuthorizedError) Error() string {
34
35
// Unwrap will always unwrap to a sql.ErrNoRows so the API returns a 404.
36
// So 'errors.Is(err, sql.ErrNoRows)' will always be true.
37
-func (NotAuthorizedError) Unwrap() error {
38
- return sql.ErrNoRows
+func (e NotAuthorizedError) Unwrap() error {
+ return e.Err
39
}
40
41
func IsNotAuthorizedError(err error) bool {
0 commit comments