|
3 | 3 | import lombok.Getter; |
4 | 4 |
|
5 | 5 | /** |
6 | | - * <h1>Error Response Model</h1> |
7 | | - * |
8 | | - * <p>This class represents an error response received from the ReSMS API when an operation fails. |
9 | | - * It extends the base {@link Response} class and contains detailed error information including |
10 | | - * an error name and message.</p> |
11 | | - * |
12 | | - * <p>Error responses are automatically translated into appropriate exception types by the |
13 | | - * {@link dev.resms.api.ReSMSApiClient}, so clients typically interact with exceptions rather |
14 | | - * than directly with this class.</p> |
15 | | - * |
16 | | - * <p>Example of a typical API error response JSON structure:</p> |
| 6 | + * This class represents an error response received from the ReSMS API when an operation fails. It |
| 7 | + * extends the base {@link Response} class and contains detailed error information including an |
| 8 | + * error name and message. |
| 9 | + * |
| 10 | + * <p>Error responses are automatically translated into appropriate exception types by the {@link |
| 11 | + * dev.resms.api.ReSMSApiClient}, so clients typically interact with exceptions rather than directly |
| 12 | + * with this class. |
| 13 | + * |
| 14 | + * <p>Example of a typical API error response JSON structure: |
| 15 | + * |
17 | 16 | * <pre> |
18 | 17 | * { |
19 | 18 | * "status": "error", |
|
23 | 22 | * } |
24 | 23 | * } |
25 | 24 | * </pre> |
26 | | - * |
27 | | - * @author ReSMS Development Team |
28 | | - * @version 1.0.1 |
| 25 | + * |
29 | 26 | * @since 1.0.0 |
30 | 27 | * @see dev.resms.model.Response |
31 | 28 | * @see dev.resms.exception.ReSMSException |
|
34 | 31 | @Getter |
35 | 32 | public class ErrorResponse extends Response { |
36 | 33 | /** |
37 | | - * <p>The error details containing the error name and message.</p> |
38 | | - * |
39 | | - * <p>This field is populated by the API response and provides detailed information |
40 | | - * about what went wrong during the API call.</p> |
41 | | - * |
| 34 | + * The error details containing the error name and message. |
| 35 | + * |
| 36 | + * <p>This field is populated by the API response and provides detailed information about what |
| 37 | + * went wrong during the API call. |
| 38 | + * |
42 | 39 | * @see ErrorDetails |
43 | 40 | */ |
44 | 41 | private ErrorDetails error; |
45 | 42 |
|
46 | 43 | /** |
| 44 | + * |
| 45 | + * |
47 | 46 | * <h2>Error Details</h2> |
48 | | - * |
49 | | - * <p>This nested class contains the specific details of an error returned by the API. |
50 | | - * It includes a standardized error name (which can be used for programmatic error handling) |
51 | | - * and a human-readable error message.</p> |
| 47 | + * |
| 48 | + * <p>This nested class contains the specific details of an error returned by the API. It includes |
| 49 | + * a standardized error name (which can be used for programmatic error handling) and a |
| 50 | + * human-readable error message. |
52 | 51 | */ |
53 | 52 | @Getter |
54 | 53 | public static class ErrorDetails { |
55 | 54 | /** |
56 | | - * <p>The standardized name of the error.</p> |
57 | | - * |
| 55 | + * The standardized name of the error. |
| 56 | + * |
58 | 57 | * <p>This field contains a machine-readable identifier for the error type, such as |
59 | | - * "INVALID_API_KEY" or "INSUFFICIENT_SMS_QUOTA". It can be used for programmatic |
60 | | - * error handling and routing to the appropriate exception type.</p> |
| 58 | + * "INVALID_API_KEY" or "INSUFFICIENT_SMS_QUOTA". It can be used for programmatic error handling |
| 59 | + * and routing to the appropriate exception type. |
61 | 60 | */ |
62 | 61 | private String name; |
63 | 62 |
|
64 | 63 | /** |
65 | | - * <p>A human-readable description of the error.</p> |
66 | | - * |
67 | | - * <p>This field contains a detailed message explaining what went wrong and, |
68 | | - * when applicable, how to fix the issue. This message is typically forwarded |
69 | | - * to the exception that is thrown.</p> |
| 64 | + * A human-readable description of the error. |
| 65 | + * |
| 66 | + * <p>This field contains a detailed message explaining what went wrong and, when applicable, |
| 67 | + * how to fix the issue. This message is typically forwarded to the exception that is thrown. |
70 | 68 | */ |
71 | 69 | private String message; |
72 | 70 | } |
|
0 commit comments