<commit_before>package com.sharefile.api;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.sharefile.api.constants.SFKeywords;
import com.sharefile.api.gson.SFGsonHelper;

/**
 * //Token refresh errors are different json format than the regular V3 errors
 * {"error":"invalid_grant","error_description":"refresh token expired"}
 */
public class SFTokenRenewError extends SFV3Error
{
    public SFTokenRenewError(int serverHttpCode, String serverRespSring, Exception exception)
    {
        super(serverHttpCode,exception);

        if(serverRespSring == null)
        {
            mServerResponse.value = super.getErrorMessageFromErroCode(serverHttpCode);
            return;
        }

        try
        {
            JsonParser jsonParser = new JsonParser();
            JsonElement jsonElement = jsonParser.parse(serverRespSring);
            JsonObject jsonObject = jsonElement.getAsJsonObject();

            mServerResponse.code = SFGsonHelper.getString(jsonObject, "error", "");
            mServerResponse.value = SFGsonHelper.getString(jsonObject, "error_description", "");
        }
        catch (Exception e)
        {
            mInternalException = exception;
        }
    }
}<commit_msg>Overwrite the errorDisplayString for SFTokenRenewError<commit_after>package com.sharefile.api;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.sharefile.api.constants.SFKeywords;
import com.sharefile.api.gson.SFGsonHelper;

/**
 * //Token refresh errors are different json format than the regular V3 errors
 * {"error":"invalid_grant","error_description":"refresh token expired"}
 */
public class SFTokenRenewError extends SFV3Error
{
    public SFTokenRenewError(int serverHttpCode, String serverRespSring, Exception exception)
    {
        super(serverHttpCode,exception);

        if(serverRespSring == null)
        {
            mServerResponse.value = super.getErrorMessageFromErroCode(serverHttpCode);
            return;
        }

        try
        {
            JsonParser jsonParser = new JsonParser();
            JsonElement jsonElement = jsonParser.parse(serverRespSring);
            JsonObject jsonObject = jsonElement.getAsJsonObject();

            mServerResponse.code = SFGsonHelper.getString(jsonObject, "error", "");
            mServerResponse.value = SFGsonHelper.getString(jsonObject, "error_description", "");
        }
        catch (Exception e)
        {
            mInternalException = exception;
        }
    }

    @Override
    public String errorDisplayString(String optionalLocalized)
    {
        return "OAuth token renew failed";
    }
}
{'fraction_non_alphanumeric': 0.09164222873900293, 'fraction_numerical': 0.001466275659824047, 'mean_word_length': 3.03698224852071, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5321897', 'n_tokens_mistral': 749, 'n_tokens_neox': 736, 'n_words': 148}