in reply to Re: EyeBall stumps BodBall
in thread EyeBall stumps BodBall (Error Handling)
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: EyeBall stumps BodBall
by Bod (Parson) on Jul 23, 2023 at 21:07 UTC | |
by eyepopslikeamosquito (Archbishop) on Jul 24, 2023 at 08:58 UTC | |
by Bod (Parson) on Aug 01, 2023 at 22:24 UTC | |
by eyepopslikeamosquito (Archbishop) on Aug 02, 2023 at 02:49 UTC | |
by hippo (Archbishop) on Aug 02, 2023 at 12:49 UTC |