Errors.d.ts 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /** Error thrown when an HTTP request fails. */
  2. export declare class HttpError extends Error {
  3. private __proto__;
  4. /** The HTTP status code represented by this error. */
  5. statusCode: number;
  6. /** Constructs a new instance of {@link @aspnet/signalr.HttpError}.
  7. *
  8. * @param {string} errorMessage A descriptive error message.
  9. * @param {number} statusCode The HTTP status code represented by this error.
  10. */
  11. constructor(errorMessage: string, statusCode: number);
  12. }
  13. /** Error thrown when a timeout elapses. */
  14. export declare class TimeoutError extends Error {
  15. private __proto__;
  16. /** Constructs a new instance of {@link @aspnet/signalr.TimeoutError}.
  17. *
  18. * @param {string} errorMessage A descriptive error message.
  19. */
  20. constructor(errorMessage?: string);
  21. }
  22. /** Error thrown when an action is aborted. */
  23. export declare class AbortError extends Error {
  24. private __proto__;
  25. /** Constructs a new instance of {@link AbortError}.
  26. *
  27. * @param {string} errorMessage A descriptive error message.
  28. */
  29. constructor(errorMessage?: string);
  30. }