Skip to content

Commit

Permalink
remove custom error
Browse files Browse the repository at this point in the history
  • Loading branch information
FayCarsons committed Feb 23, 2024
1 parent d75fe7b commit e8baee3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 148 deletions.
144 changes: 0 additions & 144 deletions backend/src/error.rs

This file was deleted.

1 change: 0 additions & 1 deletion backend/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![feature(once_cell_try)]
mod api;
mod env;
mod error;
mod model;
mod schema;
mod stripe;
Expand Down
5 changes: 2 additions & 3 deletions backend/src/stripe/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{borrow::Borrow, collections::HashMap, num::ParseIntError};

use crate::model::{item::Item, ItemId, Quantity};
use actix_web::{
error, post,
web::{self, Json},
Expand All @@ -24,7 +23,7 @@ use crate::{
order::insert_order,
stock::{dec_items, item_from_db},
},
error::{BackendError},
model::{item::Item, ItemId, Quantity},
utils::print_red,
DbPool, ENV,
};
Expand Down Expand Up @@ -172,7 +171,7 @@ pub async fn parse_webhook(
})?;

let payload_str = std::str::from_utf8(payload.borrow())
.map_err(|e| BackendError::PaymentError(e.to_string()))?;
.map_err(|e| error::ErrorInternalServerError(e.to_string()))?;

let stripe_sig = get_header_value(&req, "Stripe-Signature").unwrap_or_default();

Expand Down

0 comments on commit e8baee3

Please sign in to comment.