How about everyone. I'm trying to return an entity with an enum, not a tuple.
Currently I have already returned exceptions but my intention is to have entities by defects, because they are few.
I do this to return an exception with enum.
enum EXCEPTION: String, Error {
case REGISTER_TYPE = "You need register other type, example BANCA"
case LIST_ERROR = "You list index not exists"
}
I hope you can help me, regards.