Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

Amber Web Authorization Framework

API Documentation
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Public Types
  • Properties
  • Public Functions
  • Detailed Description

Error Class

(Amber::Web::Authorization::Error)

Encapsulates an error which occurred during an OAuth operation More...

Header: #include <Error>
  • List of all members, including inherited members

Public Types

enum Code { NoError, InvalidOperationError, InvalidParametersError, StateMismatchError, ..., OtherError }

Properties

  • code : const Code
  • httpCode : const int
  • message : const QString

Public Functions

Error()
Error(Code code, const QString &message, int httpCode = 0)
Error(const Error &other)
~Error()
Code code() const
int httpCode() const
QString message() const
Error &operator=(const Error &other)

Detailed Description

Encapsulates an error which occurred during an OAuth operation

This simple Q_GADGET class provides access to three members: code, message, and httpCode.

Member Type Documentation

enum Error::Code

This enum defines the types of errors which may be encountered by an OAuth helper.

ConstantValueDescription
Amber::Web::Authorization::Error::NoError0No error occurred, the operation succeeded
Amber::Web::Authorization::Error::InvalidOperationError1The specified operation is not valid for the currently selected flow type
Amber::Web::Authorization::Error::InvalidParametersError2The client application has not set the appropriate properties required for the operation
Amber::Web::Authorization::Error::StateMismatchError3The state data does not match the expected state, possibly due to a man-in-the-middle attack
Amber::Web::Authorization::Error::NetworkError4The helper was unable to perform the request to the remote service
Amber::Web::Authorization::Error::SslError5The request to the remote service failed due to an SSL error
Amber::Web::Authorization::Error::HttpError6The request to the remote service failed due to a HTTP error (or server-side authorization error)
Amber::Web::Authorization::Error::ParseError7The result of the request could not be parsed successfully
Amber::Web::Authorization::Error::TimedOutError8The timeout was reached while waiting for redirect
Amber::Web::Authorization::Error::OtherError9The operation failed for some other reason

See also Amber::Web::Authorization::Error::code.

Property Documentation

code : const Code

This property holds this property holds the error code associated with the most recent failed operation.

Access functions:

Code code() const

See also Amber::Web::Authorization::Error::Code.

httpCode : const int

This property holds this property holds the HTTP error code associated with the most recent failed operation.

If the code property value is HttpError then a value will be set for this property.

Access functions:

int httpCode() const

message : const QString

This property holds this property holds the error message associated with the most recent failed operation.

The message is not translated or user-friendly, but is intended for developer consumption only.

It may contain sensitive information, and as such it should not be logged persistently.

Access functions:

QString message() const

Member Function Documentation

Error::Error()

Constructs a new, empty error object

Error::Error(Code code, const QString &message, int httpCode = 0)

Constructs a new error object with the given code, message, and httpCode set

Error::Error(const Error &other)

Constructs a copy of the other error object

Error::~Error()

Destroys the error object

Error &Error::operator=(const Error &other)

Sets this error's code, message, and httpCode equal to that of the other error object.

  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn