try/catch, мдааа.... Спасибо большое)
validate(user: ResponseVkUserDto): TValidateUserResponse | HttpException {
try {
return this.validateHash(user)
} catch (error) {
throw new HttpException('Не удалось провалидировать ваши данные', 400, { description: error })
}
}
createBotHash(userString: string): string {
}
createUserString(user: TValidateUserResponse): string {
}
validateHash(user: ResponseVkUserDto): TValidateUserResponse | HttpException
{
}
}validateHash не через функцию validate а на прямую, а у нее судя по коду нет обертки try/catch, тогда получается сервер ляжет. Как быть с этим, какие решения ?
['New', 'Interesting', 'Not Answer'].map((item, index: number) => {
return (
<ButtonSecondary
text={item}
handler={() => setFilter(item)}
type={filter === item ? 'active' : 'inactive'}
key={index}
/>
)
})handler={() => setFilter(item)}setFilter(item):Argument of type string is not assignable to parameter of type
SetStateAction<'New' | 'Interesting' | 'Not Answer'>handler={() => setFilter(item as IQuestionsFilter['filter'])} ошибки отпадают, можешь объяснить, нормально ли это, и почему так происходит. Спасибо)
font.css@import '@fontsource/poppins/100.css';
@import '@fontsource/poppins/200.css';
@import '@fontsource/poppins/300.css';
@import '@fontsource/poppins/400.css';
@import '@fontsource/poppins/500.css';
@import '@fontsource/poppins/600.css';
@import '@fontsource/poppins/700.css';
@import '@fontsource/poppins/800.css';
@import '@fontsource/poppins/900.css';main.css@import "./assets/css/fonts/fonts.css";
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
html {
@apply font-poppins
}
body {
@apply bg-gray-50
}
}