Commit cb9344b
authored
Update OpenApiMiddleware.java
This line:
final NormalisedPath openApiPathString = maybeApiPath.get();
Would introduce NoSuchElementException and will be caught as "UnhandledException" by the end, which would respond with 500 Internal Server Error.
The fix is to check if the path is present on the spec, and if not, return a 401 status invalid request path.1 parent 7d54715 commit cb9344b
File tree
1 file changed
+4
-0
lines changed- src/main/java/com/networknt/aws/lambda/handler/middleware/specification
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
0 commit comments