Skip to content

Allow customer handle error codes #48

@artemijan

Description

@artemijan

Here you raise an error with text mnessage

raise AdyenAPIValidationError(erstr)

Instead of doing this we need to raise custom error that contains not only text but the errorCode too.
This is needed to handle custom validation messages on Customer side (for example with translation).
for example

class MyException(Exception):
    def __init__(self,*args,**kwargs):
        self.code = kwargs.pop('error_code',None)
        super().__init__(*args,**kwargs)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions