Skip to content
Extraits de code Groupes Projets
Valider 71fa0aa8 rédigé par Miryuni's avatar Miryuni
Parcourir les fichiers

Message d'erreur plus explicite

parent f246322f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -53,13 +53,13 @@ curl "https://$homeserver" -I -o headers -s
if test -f "headers"; then
rm headers
else
echo 1>&2 "$0:FATAL: The homeserver \"$2\" is not correct."
echo 1>&2 "$0:FATAL: The homeserver \"$2\" is incorrect."
exit 1
fi
# Checking if the token exist.
# Save the error value on file "headers" and
# compare the error to verify the token
# evaluate it to verify the token
curl -s -X POST "https://$homeserver/_matrix/media/r0/upload?access_token=$token" | python3 -c "import sys, json; print(json.load(sys.stdin)['errcode'])" >> headers
while read line; do
if [[ ($line == "M_UNKNOWN") ]]
......@@ -67,7 +67,7 @@ while read line; do
rm headers
else if [[ ($line == "M_UNKNOWN_TOKEN") ]]
then
echo "$0:ERROR: The token provided does not exist"
echo "$0:ERROR: The token provided is incorrect or does not exist in this homeserver"
rm headers
exit 1
else
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter