Skip to content

Twilio service call#692

Merged
Am0du merged 8 commits intohngprojects:devfrom
noxxspring:twilioServiceCall
Mar 2, 2025
Merged

Twilio service call#692
Am0du merged 8 commits intohngprojects:devfrom
noxxspring:twilioServiceCall

Conversation

@noxxspring
Copy link
Contributor

Screenshot 2025-02-28 230014

Copy link
Contributor

@Am0du Am0du left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test cases, also your branch is out of date

.authorizeHttpRequests(httpRequests ->
httpRequests
httpRequests.requestMatchers((WHITELIST)).permitAll()
.requestMatchers(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add other whitelisted endpoint to your Array to ensure consistency in the codebase

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the error response in the codebase

CallResponse response = twilioCallService.makeCall(callRequest);
return ResponseEntity.ok(response); // 200 OK
} catch (IllegalArgumentException e) {
return ResponseEntity.badRequest().body(new hng_java_boilerplate.twilio.CallLogs.ErrorResponse("Invalid request", e.getMessage())); // 400 Bad Request
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errors are returned a certain way in the code base, review it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a exception directory that manages exceptions, all you have to do is just throw the specified exception with a message..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to filename to entity

@Am0du Am0du merged commit a2e428a into hngprojects:dev Mar 2, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants