Issue #206: PaymentController can only respond with 404 or with NullPointerException when creating Payment#210
Conversation
…rDto and member details to HouseMemberDto to resolve the null exceptions. Made Payment#description non-unique
Codecov Report
@@ Coverage Diff @@
## master #210 +/- ##
============================================
- Coverage 69.01% 68.12% -0.89%
- Complexity 198 200 +2
============================================
Files 32 34 +2
Lines 823 866 +43
Branches 37 41 +4
============================================
+ Hits 568 590 +22
- Misses 244 268 +24
+ Partials 11 8 -3
Continue to review full report at Codecov.
|
@edwardUL99 |
I don't really remember now, in hindsight should have documted the stack trace. I believe it was an exception with IDs being greater than 255 characters. Some reason adding ManyToOne fixed that, I'm not too sure. |
mslowiak
left a comment
There was a problem hiding this comment.
There are small changes but if you correct them we can merge that @edwardUL99
service/src/main/java/com/myhome/controllers/mapper/SchedulePaymentApiMapper.java
Outdated
Show resolved
Hide resolved
service/src/main/java/com/myhome/controllers/mapper/SchedulePaymentApiMapper.java
Outdated
Show resolved
Hide resolved
|
Thanks @edwardUL99 |
|
No problem @mslowiak |
|
Feel free to take something new, there are plenty of new issues @edwardUL99 ! :) |
I didn't realise I had to name the commit with the specified pattern, sorry!
🚀 Description
This PR closes #206.
It has the following changes:
📄 Motivation and Context
This big fix resolves the NullPointerExceptions blocking pull request #205. It closes #206
🧪 How Has This Been Tested?
Since pull request #205 has not been merged yet, I copied all the required code over to my branch to re-run the failing test. I removed the Disabled annotation and ran the test and it passed.
Also used Postman to test the scenario of creating a payment. I tried the scenario of creating a payment with an admin ID that is not in the community of the member ID and got the 404 response because it couldn't find that admin in the member's community.
📷 Screenshots (if appropriate)
📦 Types of changes
✅ Checklist