Skip to content

Commit bfcb234

Browse files
committed
change status code for card not found to 404 fixes #124
1 parent 16002fa commit bfcb234

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vingo/src/routes/scans.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ pub async fn add(state: State<AppState>, body: String) -> ResponseResult<String>
100100
StatusCode::INTERNAL_SERVER_ERROR,
101101
"failed to get user for card",
102102
))?
103-
.ok_or((StatusCode::INTERNAL_SERVER_ERROR, "no card"))?
103+
.ok_or((StatusCode::NOT_FOUND, "no card"))?
104104
.1
105-
.ok_or((StatusCode::INTERNAL_SERVER_ERROR, "no user for card"))?;
105+
.ok_or((StatusCode::NOT_FOUND, "no user for card"))?;
106106

107107
Ok(user.name)
108108
}

0 commit comments

Comments
 (0)