Fix small issues, improve Result.flatMap
This commit is contained in:
parent
698e08573b
commit
87990c425c
7 changed files with 97 additions and 16 deletions
|
|
@ -54,7 +54,7 @@ class MediaSender @Inject constructor(
|
|||
is MediaUploadInfo.AnyFile -> {
|
||||
sendFile(info.file, info.info)
|
||||
}
|
||||
else -> error("Unexpected MediaUploadInfo format: $info")
|
||||
else -> Result.failure(IllegalStateException("Unexpected MediaUploadInfo format: $info"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue