Skip to content

Commit 23e389b

Browse files
committed
fix: rethrow TokenDecoderException for better error handling
1 parent 8577b83 commit 23e389b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Token/JWKSTokenDecoder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ public function decode(string $token, string $key): array
9494

9595
return json_decode($json, true, 512, JSON_THROW_ON_ERROR);
9696
}
97+
catch (TokenDecoderException $e) {
98+
throw $e;
99+
}
97100
catch (\JsonException $e) {
98101
throw TokenDecoderException::forDecodingError('JSON parsing failed: ' . $e->getMessage(), $e);
99102
}

0 commit comments

Comments
 (0)