Files
amiibo-service/Sources/AmiiboService/Public/Errors/AmiiboServiceError.swift
T

34 lines
1.1 KiB
Swift
Raw Normal View History

//===----------------------------------------------------------------------===
//
// This source file is part of the AmiiboService open source project
//
// Copyright (c) 2024-2025 Röck+Cöde VoF. and the AmiiboAPI project authors
// Licensed under the EUPL 1.2 or later.
//
// See LICENSE for license information
// See CONTRIBUTORS for the list of AmiiboAPI project authors
//
//===----------------------------------------------------------------------===
2025-09-09 17:30:19 +00:00
/// A representation of all the possible errors that the ``AmiiboService`` service could throw.
public enum AmiiboServiceError: Error {
2025-09-09 17:30:19 +00:00
/// A bad request has been given to the client.
case badRequest
2025-10-02 01:51:16 +00:00
/// A call to an endpoint has been cancelled by the user.
case cancelled
2025-09-09 17:30:19 +00:00
/// A response cannot be decoded.
case decoding
2025-09-09 17:30:19 +00:00
/// An online service is not currently available.
case notAvailable
2025-09-09 17:30:19 +00:00
/// A response cannot be found.
case notFound
2025-09-09 17:30:19 +00:00
/// An undocumented/unsupported status code error.
case undocumented(_ statusCode: Int)
2025-09-09 17:30:19 +00:00
/// An unknown error.
case unknown
}
// MARK: - Equatable
extension AmiiboServiceError: Equatable {}