Skip to content

'validateSuccessfulResponse' shouldn't a part of result<T: DataResponseSerializerProtocol> method  #191

@bigMOTOR

Description

@bigMOTOR

validateSuccessfulResponse shouldn't be a part of result<T: DataResponseSerializerProtocol> method. This lefts no room for function composition like runRequest -> validate -> getResult. Current way it fires implicit validation error validate(statusCode: 200..<300) no matter if I have my own function in validate.
I see having validateSuccessfulResponse inside result as a violation of the separation of concern principle.

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