Added get scheduled transaction.
This commit is contained in:
@@ -14,6 +14,9 @@ use crate::routes::{
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum AppError {
|
||||
#[error("not found")]
|
||||
NotFound,
|
||||
|
||||
#[error("database error")]
|
||||
Database(#[from] sqlx::Error),
|
||||
|
||||
@@ -33,6 +36,7 @@ pub enum AppError {
|
||||
impl IntoResponse for AppError {
|
||||
fn into_response(self) -> Response {
|
||||
match self {
|
||||
Self::NotFound => return StatusCode::NOT_FOUND.into_response(),
|
||||
Self::ScheduledTransactionValidation(error) => {
|
||||
return (StatusCode::UNPROCESSABLE_ENTITY, error.to_string()).into_response();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user