Commit ec10b5b 1 parent 736d49b commit ec10b5b Copy full SHA for ec10b5b
File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : jwt
2
- version : 1.3.0
2
+ version : 1.3.1
3
3
4
4
authors :
5
5
- Potapov Sergey <blake131313@gmail.com>
Original file line number Diff line number Diff line change @@ -80,10 +80,12 @@ module JWT
80
80
end
81
81
82
82
{payload, header}
83
- rescue Base64 ::Error
84
- raise DecodeError .new(" Invalid Base64" )
85
- rescue JSON ::ParseException
86
- raise DecodeError .new(" Invalid JSON" )
83
+ rescue error : Base64 ::Error
84
+ raise DecodeError .new(" Invalid Base64" , error)
85
+ rescue error : JSON ::ParseException
86
+ raise DecodeError .new(" Invalid JSON" , error)
87
+ rescue error : TypeCastError
88
+ raise DecodeError .new(" Invalid JWT payload" , error)
87
89
end
88
90
89
91
def encode_header (algorithm : Algorithm , ** keys) : String
You can’t perform that action at this time.
0 commit comments