Skip to content

Commit 1638302

Browse files
committed
fix: error messages
1 parent 9452961 commit 1638302

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pragma-entities/src/models/entry_error.rs

+5
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ impl IntoResponse for EntryError {
5858
StatusCode::UNAUTHORIZED,
5959
"Unauthorized publisher".to_string(),
6060
),
61+
Self::InvalidTimestamp => (StatusCode::BAD_REQUEST, "Invalid timestamp".to_string()),
62+
Self::PublisherError(err) => (
63+
StatusCode::INTERNAL_SERVER_ERROR,
64+
format!("Publisher error: {}", err),
65+
),
6166
_ => (
6267
StatusCode::INTERNAL_SERVER_ERROR,
6368
String::from("Internal server error"),

0 commit comments

Comments
 (0)