Версия Android SDK
- Mutable
- CollectionMapper
- AppCall
- CustomTab
- CustomTabUtils
- DialogFeature
- DialogPresenter
- FacebookDialogBase
- FacebookDialogFragment
- GamingAction
- FacebookWebFallbackDialog
- FragmentWrapper
- InstagramCustomTab
- PlatformServiceClient
- WebDialog
- AnalyticsEvents
- AttributionIdentifiers
- BoltsMeasurementEventListener
- BundleJSONConverter
- CallbackManagerImpl
- FacebookInitProvider
- FacebookRequestErrorClassification
- FacebookSignatureValidator
- FeatureManager
- FetchedAppGateKeepersManager
- FetchedAppSettings
- FetchedAppSettingsManager
- FileLruCache
- ImageDownloader
- ImageRequest
- ImageResponse
- ImageResponseCache
- InstallReferrerUtil
- InternalSettings
- LockOnGetVariable
- Logger
- NativeAppCallAttachmentStore
- NativeProtocol
- ServerProtocol
- SmartLoginOption
- UrlRedirectCache
- Utility
- Validate
- WorkQueue
- MessageDialog
- SendButton
- ShareButton
- ShareButtonBase
- GameRequestDialog
- ShareDialog
- MessageDialogFeature
- VideoUploader
- GameRequestValidation
- CameraEffectFeature
- CameraEffectJSONUtility
- LegacyNativeDialogParameters
- NativeDialogParameters
- ResultProcessor
- ShareConstants
- ShareContentValidation
- ShareDialogFeature
- ShareFeedContent
- ShareInternalUtility
- ShareStoryFeature
- WebDialogParameters
- ShareApi
- ShareBuilder
- Sharer
- Share
- ShareToMessengerParamsBuilder
- Messenger
- MessengerThreadParams
- MessengerUtils
- ShareToMessengerParams
- FacebookAppLinkResolver
- AppLinkData
- AppLinks
- AggregateException
- AppLink
- AppLinkResolver
- AppLinks
- CancellationToken
- CancellationTokenRegistration
- CancellationTokenSource
- Continuation
- ExecutorException
- Task
- TaskCompletionSource
- UnobservedTaskException
- AccessTokenTracker
- AuthenticationTokenTracker
- CustomTabActivity
- CustomTabMainActivity
- FacebookActivity
- FacebookAuthorizationException
- FacebookButtonBase
- FacebookCallback
- FacebookDialog
- FacebookDialogException
- LoginStatusCallback
- WebDialog
- AccessToken
- AccessTokenManager
- AccessTokenSource
- AuthenticationToken
- AuthenticationTokenCache
- AuthenticationTokenClaims
- AuthenticationTokenHeader
- AuthenticationTokenManager
- CallbackManager
- CurrentAccessTokenExpirationBroadcastReceiver
- FacebookBroadcastReceiver
- FacebookContentProvider
- FacebookException
- FacebookGraphResponseException
- FacebookOperationCanceledException
- FacebookRequestError
- FacebookSdk
- FacebookSdkNotInitializedException
- FacebookServiceException
- GraphRequest
- GraphRequestAsyncTask
- GraphRequestBatch
- GraphResponse
- HttpMethod
- LoggingBehavior
- Profile
- ProfileCache
- ProfileManager
- ProfileTracker
- ProgressNoopOutputStream
- ProgressOutputStream
- RequestProgress
- Common
- DeviceRequestsHelper
- EndToEndDumper
- CodeChallengeMethod
- CustomTabLoginMethodHandler
- CustomTabPrefetchHelper
- DeviceAuthDialog
- DeviceAuthMethodHandler
- GetTokenLoginMethodHandler
- KatanaProxyLoginMethodHandler
- LoginBehavior
- LoginClient
- LoginConfiguration
- LoginFragment
- LoginManager
- LoginMethodHandler
- LoginResult
- NativeAppLoginMethodHandler
- NonceUtil
- WebLoginMethodHandler
- WebViewLoginMethodHandler
- DefaultAudience
- LoginTargetApp
- DeviceLoginManager
- Login
- AppGroupCreationContent
- CameraEffectArguments
- CameraEffectTextures
- GameRequestContent
- ShareCameraEffectContent
- ShareContent
- ShareHashtag
- ShareLinkContent
- ShareMedia
- ShareMediaContent
- ShareMessengerActionButton
- ShareMessengerURLActionButton
- ShareModel
- ShareModelBuilder
- SharePhoto
- SharePhotoContent
- ShareStoryContent
- ShareVideo
- ShareVideoContent
- AccessTokenAppIdPair
- AppEvent
- AppEventsConstants
- AppEventsLogger
- AppEventsManager
- FlushResult
- InternalAppEventsLogger
- UserDataStore
- MetadataIndexer
- MetadataRule
- SettingsAPIFields
- AppEventsCAPIManager
- CustomEventField
- AppEventType
- AppEventUserAndAppDataField
- ConversionsAPISection
- ConversionsAPICustomEventField
- ConversionsAPIUserAndAppDataField
- ConversionsAPIEventName
- OtherEventConstants
- AppEventsConversionsAPITransformer
- AppEventsConversionsAPITransformerWebRequests
- CodelessLoggingEventListener
- CodelessManager
- RCTCodelessLoggingEventListener
- ViewIndexer
- Constants
- EventBinding
- ParameterComponent
- PathComponent
- SensitiveUserDataUtils
- UnityReflection
- ViewHierarchy
- EventDeactivationManager
- InAppPurchaseActivityLifecycleTracker
- InAppPurchaseAutoLogger
- InAppPurchaseBillingClientWrapper
- InAppPurchaseEventManager
- InAppPurchaseLoggerManager
- InAppPurchaseManager
- InAppPurchaseSkuDetailsWrapper
- InAppPurchaseUtils
- IntegrityManager
- ActivityLifecycleTracker
- AppEventUtility
- AppEventsLoggerUtility
- AutomaticAnalyticsLogger
- Constants
- FileDownloadTask
- ViewHierarchyConstants
- MTensor
- Model
- ModelManager
- Utils
- OnDeviceProcessingManager
- RemoteServiceWrapper
- RestrictiveDataManager
- SuggestedEventsManager
- ViewOnClickListener
- Core
- GateKeeper
- GateKeeperRuntimeCache
- ExceptionAnalyzer
- InstrumentData
- InstrumentManager
- InstrumentUtility
- ANRDetector
- ANRHandler
- CrashHandler
- AutoHandleExceptions
- CrashShieldHandler
- NoAutoExceptionHandling
- ErrorReportData
- ErrorReportHandler
- ThreadCheckHandler
- Excuse
- ExcusesForDesignViolations
- CertificateUtil
- OidcSecurityUtil
- DeviceLoginButton
- LoginButton
- ProfilePictureView
- ToolTipPopup
- All
All Implemented Interfaces:
android.os.Parcelable
public final class FacebookRequestError implements Parcelable
This class represents an error that occurred during a Facebook request.
In general, one would call .getCategory to determine the type of error that occurred, and act accordingly. For more information on error handling, see [
- https://developers.facebook.com/docs/reference/api/errors/](https://developers.facebook.com/docs/reference/api/errors/)
Nested Class Summary
Modifier and Type | Class | Description |
---|---|---|
public final class | FacebookRequestError.Range | |
public enum | FacebookRequestError.Category | An enum that represents the Facebook SDK classification for the error that occurred. |
public class | FacebookRequestError.Companion |
Field Summary
Modifier and Type | Field | Description |
---|---|---|
private final String | errorMessage | |
private FacebookException | exception | |
private final FacebookRequestError.Category | category | |
private final String | errorRecoveryMessage | |
private final Integer | requestStatusCode | |
private final Integer | errorCode | |
private final Integer | subErrorCode | |
private final String | errorType | |
private final String | errorUserTitle | |
private final String | errorUserMessage | |
private final JSONObject | requestResultBody | |
private final JSONObject | requestResult | |
private final Object | batchRequestResult | |
private final HttpURLConnection | connection |
Constructor Summary
Constructor | Description |
---|---|
FacebookRequestError(HttpURLConnection connection, Exception exception) | |
FacebookRequestError(Integer errorCode, String errorType, String errorMessage) |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
final String | getErrorMessage() | |
final FacebookException | getException() | Returns the exception associated with this request, if any. |
final Unit | setException(FacebookException exception) | |
final FacebookRequestError.Category | getCategory() | Returns the category in which the error belongs. |
final String | getErrorRecoveryMessage() | Returns the message that can be displayed to the user before attempting error recovery. |
final Integer | getRequestStatusCode() | Returns the HTTP status code for this particular request. |
final Integer | getErrorCode() | Returns the error code returned from Facebook. |
final Integer | getSubErrorCode() | Returns the sub-error code returned from Facebook. |
final String | getErrorType() | Returns the type of error as a raw string. |
final String | getErrorUserTitle() | Returns a short summary of the error suitable for display to the user. |
final String | getErrorUserMessage() | Returns a message suitable for display to the user, describing a user action necessary to enable Facebook functionality. |
final JSONObject | getRequestResultBody() | Returns the body portion of the response corresponding to the request from Facebook. |
final JSONObject | getRequestResult() | Returns the full JSON response for the corresponding request. |
final Object | getBatchRequestResult() | Returns the full JSON response for the batch request. |
final HttpURLConnection | getConnection() | Returns the HTTP connection that was used to make the request. |
String | toString() | |
Unit | writeToParcel(Parcel out, Integer flags) | |
Integer | describeContents() |
Constructor Detail
FacebookRequestError
FacebookRequestError(HttpURLConnection connection, Exception exception)
Method Detail
getErrorMessage
final StringgetErrorMessage()
getException
final FacebookExceptiongetException()
Returns the exception associated with this request, if any.
setException
final UnitsetException(FacebookException exception)
getCategory
final FacebookRequestError.CategorygetCategory()
Returns the category in which the error belongs. Applications can use the category to determine how best to handle the errors (e.g. exponential backoff for retries if being throttled).
getErrorRecoveryMessage
final StringgetErrorRecoveryMessage()
Returns the message that can be displayed to the user before attempting error recovery.
getRequestStatusCode
final IntegergetRequestStatusCode()
Returns the HTTP status code for this particular request.
getErrorType
final StringgetErrorType()
Returns the type of error as a raw string. This is generally less useful than using the .getCategory method, but can provide further details on the error.
getErrorUserTitle
final StringgetErrorUserTitle()
Returns a short summary of the error suitable for display to the user. Not all Facebook errors yield a title/message suitable for user display; however in all cases where getErrorUserTitle() returns valid String - user should be notified.
getErrorUserMessage
final StringgetErrorUserMessage()
Returns a message suitable for display to the user, describing a user action necessary to enable Facebook functionality. Not all Facebook errors yield a message suitable for user display; however in all cases where shouldNotifyUser() returns true, this method returns a non-null message suitable for display.
getRequestResultBody
final JSONObjectgetRequestResultBody()
Returns the body portion of the response corresponding to the request from Facebook.
getRequestResult
final JSONObjectgetRequestResult()
Returns the full JSON response for the corresponding request. In a non-batch request, this would be the raw response in the form of a JSON object. In a batch request, this result will contain the body of the response as well as the HTTP headers that pertain to the specific request (in the form of a "headers" JSONArray).
getBatchRequestResult
final ObjectgetBatchRequestResult()
Returns the full JSON response for the batch request. If the request was not a batch request, then the result from this method is the same as .getRequestResult. In case of a batch request, the result will be a JSONArray where the elements correspond to the requests in the batch. Callers should check the return type against either JSONObject or JSONArray and cast accordingly.
getConnection
final HttpURLConnectiongetConnection()
Returns the HTTP connection that was used to make the request.
writeToParcel
UnitwriteToParcel(Parcel out, Integer flags)
describeContents
IntegerdescribeContents()