File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222- #159 generated pid file not get deleted when app process is killed
2323- #157 SEO support on routing
2424- #156 Compile error is not displayed at dev mode
25- - #153 When `@NotNull` used along with `@DbBind` it shall return 404 if binding failed
25+ - #153 When `@NotNull` used along with `@DbBind` it shall return 404 if binding failed
2626- #152 Allow annotation based interceptor class to be registered as global interceptor
27+ - #124 Improve error reporting on "Unknown accept content type"
2728
2829- #136 Allow `@With` annotation to be used on specific handler method
2930
Original file line number Diff line number Diff line change @@ -59,7 +59,16 @@ public void apply(H.Request req, H.Response resp) {
5959 public void apply (ActionContext context ) {
6060 H .Format fmt = context .accept ();
6161 if (fmt == UNKNOWN ) {
62- throw E .unsupport ("Unknown accept content type" );
62+ H .Request req = context .req ();
63+ H .Method method = req .method ();
64+ String methodInfo = S .concat (method .name (), " method to " );
65+ String acceptHeader = req .header (H .Header .Names .ACCEPT );
66+ throw E .unsupport (S .concat (
67+ "Unknown accept content type(" ,
68+ acceptHeader ,
69+ "): " ,
70+ methodInfo ,
71+ req .url ()));
6372 }
6473 Result result = null ;
6574 if (JSON == fmt ) {
You can’t perform that action at this time.
0 commit comments