refactor: single refusal shape with openapi contract test
This commit is contained in:
@@ -21,3 +21,12 @@ pub type ActivityFeedResponse = PaginatedResponse<crate::diary::FeedEntryDto>;
|
||||
pub type WatchlistResponse = PaginatedResponse<crate::watchlist::WatchlistEntryDto>;
|
||||
pub type PaginatedMovieHits = PaginatedResponse<crate::search::MovieSearchHitDto>;
|
||||
pub type PaginatedPersonHits = PaginatedResponse<crate::search::PersonSearchHitDto>;
|
||||
|
||||
/// The one body every JSON API refusal carries.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, utoipa::ToSchema)]
|
||||
pub struct ErrorResponse {
|
||||
/// Human-readable message.
|
||||
pub error: String,
|
||||
/// Stable machine-readable code, e.g. `NOT_FOUND`.
|
||||
pub code: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user