The modules set error in any error. The modules provide the success method which returns true on success or false if there was an error. The user of the module is expected to check success. The error method returns the error value so that the user can understand why success is false.
I see most of your Business::Stripe::Webhook module's methods begin by clearing the module error property via:
presumably to avoid confusion from a spurious error property set by an earlier method call. Is that right?$self->{'error'} = '';
I also noticed your get_subscription method does not do this. Is this a bug?
In case it helps, another minor issue I noticed is the return value of your check_signature method is not documented. Examining the code indicates it can return 1 or 0 or undef. It would be good to document this method's return value and the difference between returning 0 and undef.
In reply to Re^2: EyeBall stumps BodBall
by eyepopslikeamosquito
in thread EyeBall stumps BodBall (Error Handling)
by eyepopslikeamosquito
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |