11/**
2- * The `ErrorResponse ` class represents an error REST response. It allows developers to construct
2+ * The `libak_ErrorResponse ` class represents an error REST response. It allows developers to construct
33 * responses with custom error messages, status codes, and details.
44 */
5- public class ErrorResponse implements RestFramework .IRestResponse {
5+ public class libak_ErrorResponse implements libak_RestFramework .IRestResponse {
66 @TestVisible
77 private Integer statusCode ;
88 @TestVisible
99 private String summary ;
1010 private String details ;
1111
1212 /**
13- * Constructs a new `ErrorResponse ` with the specified status code, summary, and details.
13+ * Constructs a new `libak_ErrorResponse ` with the specified status code, summary, and details.
1414 *
1515 * @param statusCode The HTTP status code for the error response.
1616 * @param summary A summary message describing the error.
1717 * @param details Additional details about the error.
1818 */
19- public ErrorResponse (Integer statusCode , String summary , String details ) {
19+ public libak_ErrorResponse (Integer statusCode , String summary , String details ) {
2020 this .statusCode = statusCode ;
2121 this .summary = summary ;
2222 this .details = details ;
2323 }
2424
2525 /**
26- * Constructs a new `ErrorResponse ` with the specified status code and summary,
26+ * Constructs a new `libak_ErrorResponse ` with the specified status code and summary,
2727 * based on an exception.
2828 *
2929 * @param status The HTTP status code for the error response.
3030 * @param summary A summary message describing the error.
3131 * @param exc The exception from which to derive error details.
3232 */
33- public ErrorResponse (Integer status , String summary , Exception exc ) {
33+ public libak_ErrorResponse (Integer status , String summary , Exception exc ) {
3434 this (status , summary , exc ?. getMessage ());
3535 }
3636
3737 /**
38- * Constructs a new `ErrorResponse ` based on an exception. It sets the status code,
38+ * Constructs a new `libak_ErrorResponse ` based on an exception. It sets the status code,
3939 * summary, and details based on the exception's information.
4040 *
4141 * @param status The HTTP status code for the error response.
4242 * @param exc The exception from which to derive error details.
4343 */
44- public ErrorResponse (Integer status , Exception exc ) {
44+ public libak_ErrorResponse (Integer status , Exception exc ) {
4545 this (status , exc ?. getMessage (), exc );
4646 }
4747
@@ -53,6 +53,6 @@ public class ErrorResponse implements RestFramework.IRestResponse {
5353 public void sendResponse () {
5454 RestContext .response .statusCode = this .statusCode ;
5555 RestContext .response .responseBody = BLOB .valueOf (JSON .serialize (this ));
56- RestContext .response .addHeader (RestFramework .HEADER_NAME_CONTENT_TYPE , RestFramework .CONTENT_TYPE_APPLICATION_JSON );
56+ RestContext .response .addHeader (libak_RestFramework .HEADER_NAME_CONTENT_TYPE , libak_RestFramework .CONTENT_TYPE_APPLICATION_JSON );
5757 }
5858}
0 commit comments