Skip to content

Commit ba7fc0b

Browse files
fix 405 errors
1 parent 5f5b431 commit ba7fc0b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

sandbox/controllers/Controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class Controller {
106106

107107
static async handleRequest(request, response, serviceOperation) {
108108
try {
109+
const requestParams = this.collectRequestParams(request);
109110
const serviceResponse = await serviceOperation(requestParams);
110111
Controller.sendResponse(response, serviceResponse);
111112
} catch (error) {

sandbox/utils/ResponseProvider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async function mapExampleResponse(requestBody, exampleResponseMap) {
2727
throw err;
2828
}
2929
}
30-
return null; // no match
30+
return {responsePath:'data/examples/errors/responses/resourceNotFound.json',responseCode: 404}; // no match
3131
})
3232
);
3333

@@ -45,7 +45,7 @@ function mapExampleGetResponse(parameterValue, exampleResponseMap) {
4545
throw err;
4646
}
4747
});
48-
return match ? match[1] : null;
48+
return match ? match[1] : {responsePath:'data/examples/errors/responses/resourceNotFound.json',responseCode: 404};
4949
}
5050

5151
async function getLetterStatusResponse(id) {

0 commit comments

Comments
 (0)