Skip to content

Instantly share code, notes, and snippets.

Created September 10, 2018 19:42
What would you like to do?
public class HelloController {
@PostMapping(path = "/sayHello")
public HelloResponse sayHello(@RequestBody HelloRequest request){
throw new SyntaxException();
return HelloResponse.builder()
.message(String.format("Hello %s!!", request.getName()))
public ApiError handleSyntaxException(){
return ApiError.builder()
.error("Syntax Error (from controller)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment