You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, when a user is not authorized, Ada often returns "Could not determine object type". This is not a very helpful message. We need to catch the real error the API returns to Curl, and make that visible to the user.
The text was updated successfully, but these errors were encountered:
pathtype () {
# Get the type of an object. Possible outcomes:
# DIR = directory
# REGULAR = file
# LINK = symbolic link
# <empty> = something went wrong... no permission?
local path
path=$(urlencode "$1")
curl "${curl_authorization[@]}" \
"${curl_options_no_errors[@]}" \
-X GET "$api/namespace/$path" \
| jq -r .fileType
}
The HTTP code returned by curl is not caught. We need to catch it, and if there is an error (code not in range 200-399, or unexpected output): print it and exit with an exit code not 0.
Now, when a user is not authorized, Ada often returns "Could not determine object type". This is not a very helpful message. We need to catch the real error the API returns to Curl, and make that visible to the user.
The text was updated successfully, but these errors were encountered: