GD Shortener’s Exceptions

List of exceptions that this module handles:

class gdshortener.GDMalformedURLError(error_description=None)

This exceptions identify a problem with the URL that had to be shortened.

Parameters:error_description (str.) – Error description obtained from is.gd
error_code

is.gd error code:

  • error code 1: there was a problem with the original long URL provided
  • error code 2: there was a problem with the short URL provided (for custom short URLs)
  • error code 3: our rate limit was exceeded (your app should wait before trying again)
  • error code 4: any other error (includes potential problems with our service such as a maintenance period)
Returns:int.
error_description

is.gd description for this error.

Returns:str.
class gdshortener.GDShortURLError(error_description=None)

This exceptions identify a problem with the shortened URL.

Could be either an error on custom shortener URL or a copyright error on a URL (in which case it could had been disabled).

Parameters:error_description (str.) – Error description obtained from is.gd
error_code

is.gd error code:

  • error code 1: there was a problem with the original long URL provided
  • error code 2: there was a problem with the short URL provided (for custom short URLs)
  • error code 3: our rate limit was exceeded (your app should wait before trying again)
  • error code 4: any other error (includes potential problems with our service such as a maintenance period)
Returns:int.
error_description

is.gd description for this error.

Returns:str.
class gdshortener.GDRateLimitError(error_description=None)

This exceptions is raised when is.gd rate limit has been exceeded.

Parameters:error_description (str.) – Error description obtained from is.gd
error_code

is.gd error code:

  • error code 1: there was a problem with the original long URL provided
  • error code 2: there was a problem with the short URL provided (for custom short URLs)
  • error code 3: our rate limit was exceeded (your app should wait before trying again)
  • error code 4: any other error (includes potential problems with our service such as a maintenance period)
Returns:int.
error_description

is.gd description for this error.

Returns:str.
class gdshortener.GDGenericError(error_description=None)

This exceptions is raised when is.gd states a generic problem.

Further informations are provided on error description.

Parameters:error_description (str.) – Error description obtained from is.gd
error_code

is.gd error code:

  • error code 1: there was a problem with the original long URL provided
  • error code 2: there was a problem with the short URL provided (for custom short URLs)
  • error code 3: our rate limit was exceeded (your app should wait before trying again)
  • error code 4: any other error (includes potential problems with our service such as a maintenance period)
Returns:int.
error_description

is.gd description for this error.

Returns:str.

Previous topic

GD Shortener’s classes

This Page