Skip to content

Commit 7b9e008

Browse files
authored
Merge pull request #33 from akohan91/bugfix/remove-status-code-from-the-error-response-json-body
bugfix/remove-status-code-from-the-error-response-json-body
2 parents f208a1d + 9f65565 commit 7b9e008

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

API_Reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ Constructs a new `libak_ErrorResponse` based on an exception. It sets the status
517517

518518
#### `sendResponse()`
519519

520-
Sends the error response with the configured status code, summary, and details. It sets the HTTP status code, response body (serialized error information in JSON format), and content type header in the RestContext's response object.
520+
Sends the error response with the configured summary, and details. It sets the HTTP status code, response body (serialized error information in JSON format but without statusCode property which is set only for the `RestContext.response.statusCode`), and content type header in the RestContext's response object.
521521

522522
---
523523

force-app/main/default/classes/libak_ErrorResponse.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
public class libak_ErrorResponse implements libak_IRestResponse {
66
@TestVisible
7-
private Integer statusCode;
7+
private transient Integer statusCode;
88
@TestVisible
99
private String summary;
1010
private String details;

0 commit comments

Comments
 (0)