mirror of
https://github.com/danbulant/Portfolio
synced 2026-06-16 13:01:13 +00:00
fix: status code
This commit is contained in:
parent
ed3d0c3549
commit
fb07608114
1 changed files with 1 additions and 1 deletions
|
|
@ -148,7 +148,7 @@ pub async fn get_candidate(
|
|||
|
||||
let candidate = Query::find_candidate_by_id(db, id)
|
||||
.await
|
||||
.map_err(|e| to_custom_error(ServiceError::Forbidden))? // TODO better error handling
|
||||
.map_err(|e| to_custom_error(ServiceError::DbError(e)))?
|
||||
.ok_or(to_custom_error(ServiceError::CandidateNotFound))?;
|
||||
|
||||
let details = ApplicationService::decrypt_all_details(
|
||||
|
|
|
|||
Loading…
Reference in a new issue