Added book error indication

This commit is contained in:
2023-08-08 18:28:42 +03:00
parent 4135c29160
commit ea18439140

View File

@ -6,6 +6,10 @@ const composeBookURL = () => (
)
const processBook = (data: BookResponse): Book => {
if (!data.Success) {
throw new Error('Не удалось забронировать объявление')
}
return data.Success
}