Improve error reporting when a file cannot be stored

Fixes logging the error (the effect was not evaluated before) and also
distinguishes this case from having no files in the request.

Closes: #1976
This commit is contained in:
eikek
2023-03-04 22:01:56 +01:00
parent d7b191a59b
commit f146511928
2 changed files with 30 additions and 21 deletions

View File

@ -689,6 +689,11 @@ trait Conversions {
case UploadResult.NoItem => BasicResult(false, "The item could not be found.")
case UploadResult.NoCollective =>
BasicResult(false, "The collective could not be found.")
case UploadResult.StoreFailure(_) =>
BasicResult(
false,
"There were errors storing a file! See the server logs for details."
)
}
def basicResult(cr: PassChangeResult): BasicResult =