-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom error handler #153
Custom error handler #153
Conversation
Toto bude asi cca ok, ale potrebujeme handlovat custom chyby z autorizatora a pripadne aj z param validácie. Nie som si istý ci som to do tasku napísal |
src/Error/ErrorHandlerInterface.php
Outdated
/** | ||
* @param array<mixed> $params | ||
*/ | ||
public function handle(Throwable $error, array $params): JsonApiResponse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tu mas error ale v default implementaci je exception. Zjednot to, pri named parametroch je toto neziaduci jav
$authorization = $api->getAuthorization(); | ||
$rateLimit = $api->getRateLimit(); | ||
|
||
$authResponse = $this->checkAuth($authorization); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preco sme presunuli autorizaciu az za parametre a rate limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lebo treba spracovat parametre aby som mal dostupny Context do erroru. Nepacilo sa mi to ale lepsie som nevymyslel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm už si spomínam. Len teraz úplne zmeníme výstupy - ak niečo predtým padlo už na autorizácii, alebo rate limite parametre sa vôbec neriešili. Teraz to bude naopak a neviem povedať ci korektne.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no nic, skusme to mergnut, uvidime ci nas to nakope niekde do zadku
No description provided.