Skip to main content

Class HttpException

The exception that is thrown if an error occurs while processing an Discord HTTP request.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public class HttpException : Exception, ISerializable, _Exception

Properties​

HttpCode​

Gets the HTTP status code returned by Discord.

View Source​
Declaration
public HttpStatusCode HttpCode { get; }

DiscordCode​

Gets the JSON error code returned by Discord.

View Source​
Declaration
public DiscordErrorCode? DiscordCode { get; }

Reason​

Gets the reason of the exception.

View Source​
Declaration
public string Reason { get; }

Request​

Gets the request object used to send the request.

View Source​
Declaration
public IRequest Request { get; }

Errors​

Gets a collection of json errors describing what went wrong with the request.

View Source​
Declaration
public IReadOnlyCollection<DiscordJsonError> Errors { get; }

Implements​

  • System.Runtime.Serialization.ISerializable
  • System.Runtime.InteropServices._Exception