use of com.microsoft.identity.common.exception.UserCancelException in project microsoft-authentication-library-common-for-android by AzureAD.
the class ApiEndEvent method putException.
public ApiEndEvent putException(@NonNull final Exception exception) {
if (exception == null) {
return this;
}
final BaseException adaptedException = ExceptionAdapter.baseExceptionFromException(exception);
if (adaptedException instanceof UserCancelException) {
put(Key.USER_CANCEL, Value.TRUE);
}
put(Key.SERVER_ERROR_CODE, adaptedException.getCliTelemErrorCode());
put(Key.SERVER_SUBERROR_CODE, adaptedException.getCliTelemSubErrorCode());
put(Key.ERROR_CODE, adaptedException.getErrorCode());
put(Key.SPE_RING, adaptedException.getSpeRing());
// oii
put(Key.ERROR_DESCRIPTION, adaptedException.getMessage());
put(Key.RT_AGE, adaptedException.getRefreshTokenAge());
put(Key.IS_SUCCESSFUL, Value.FALSE);
return this;
}
Aggregations