-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathNiceError.cs
29 lines (27 loc) · 1.24 KB
/
NiceError.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
namespace EWeLink.Api
{
using System.Collections.Generic;
internal static class NiceError
{
public static IReadOnlyDictionary<int, string> Errors { get; } = new Dictionary<int, string>
{
{ 400, "Parameter error" },
{ 401, "Wrong account or password" },
{ 402, "Email inactivated" },
{ 403, "Forbidden" },
{ 404, "Device does not exist" },
{ 406, "Authentication failed" },
};
public static IReadOnlyDictionary<CustomErrors, string> Custom { get; } = new Dictionary<CustomErrors, string>
{
{ CustomErrors.Ch404, "Device channel does not exist" },
{ CustomErrors.Unknown, "An unknown error occurred" },
{ CustomErrors.NoDevices, "No devices found" },
{ CustomErrors.NoPower, "No power usage data found" },
{ CustomErrors.NoSensor, "Can\'t read sensor data from device" },
{ CustomErrors.NoFirmware, "Can\'t get model or firmware version" },
{ CustomErrors.InvalidAuth, "Library needs to be initialized using email and password" },
{ CustomErrors.InvalidCredentials, "Invalid credentials provided" },
};
}
}