Open soxofaan opened 1 year ago
FileTypeInvalid is for the /files endpoints (tag: "File Management"), the others are for specific processes. I assumed some back-ends may want to restrict what users could upload, but maybe they don't? Anyway, it doesn't hurt to have the error, no?
back-ends may want to restrict what users could upload, but maybe they don't?
that just seems annoying. And users probably will circumvent it anyway (e.g. append .txt
or .json
extension just to get something uploaded)
Anyway, it doesn't hurt to have the error, no?
Well, its presence tricked me in using the wrong error code in the validation part of load_url
:smile:
The API defines
FileTypeInvalid
https://github.com/Open-EO/openeo-api/blob/c5a45b4647b06e313a4f099e9119bfa3cca5c6a3/errors.json#L162-L168A couple openeo processes however define
FormatUnsuitable
:load_uploaded_files
,load_url
,save_result
.I wonder how useful
FileTypeInvalid
is actually. It's defined in openeo-api, becuase it's part of the file API, but why would certain file extensions or format (which implies inspection of the data) be forbidden in the phase of uploading a file? That seems like a pretty annoying feature of a file API.If a back-end does not support loading the format at processing time, then it will throw
FormatUnsuitable