MauroDataMapper / mdm-core

The backend of MDM
Apache License 2.0
7 stars 3 forks source link

ApiBadRequestException in /api/tree/dataModels/DataModel/ #444

Closed ole4ryb closed 1 year ago

ole4ryb commented 1 year ago

Description

ApiBadRequestException in /api/tree/dataModels/DataModel/ log entry.

Steps to reproduce

I don't know exactly how to reproduce it as I only noticed the exception in logs while trying to reproduce an issue with NHS Data Dictionary. Some data sets were not populated in NHS Data Dictionary as you can see in the attachments. I am not exactly sure if my changes in NHS Data Dictionary triggered that exception or not

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

Screenshot-2023-07-24-at-12 44 27 Screenshot-2023-07-24-at-12 44 03

Environment

Please complete the following information:

Additional context

Log entries with the exception:

1690283336634,"2023-07-25 11:08:56,634 [080-exec-6] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690285769786,"2023-07-25 11:49:29,785 [80-exec-11] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690288735254,"2023-07-25 12:38:55,254 [080-exec-4] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690295213307,"2023-07-25 14:26:53,306 [80-exec-10] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690295845705,"2023-07-25 14:37:25,705 [080-exec-9] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690296203657,"2023-07-25 14:43:23,657 [080-exec-5] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690297254131,"2023-07-25 15:00:54,131 [80-exec-10] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690298234445,"2023-07-25 15:17:14,445 [080-exec-5] WARN o.c.a.OpenidConnectAuthenticationService : Attempt to authenticate using unknown OAUTH Provider" 1690299534396,"2023-07-25 15:38:54,396 [080-exec-9] ERROR o.g.web.errors.GrailsExceptionResolver : ApiBadRequestException occurred when processing request: [GET] /api/tree/dataModels/DataModel/1277882a-ad55-49fd-be8a-748a3922e8ab" 1690299534396,Tree called for non-Container class DataModel. Stacktrace follows: 1690299534396,uk.ac.ox.softeng.maurodatamapper.api.exception.ApiBadRequestException: Tree called for non-Container class DataModel 1690299534396, at uk.ac.ox.softeng.maurodatamapper.core.tree.TreeItemInterceptor.before(TreeItemInterceptor.groovy:58) 1690299534396, at org.grails.plugins.web.interceptors.GrailsInterceptorHandlerInterceptorAdapter.preHandle(GrailsInterceptorHandlerInterceptorAdapter.groovy:77) 1690299534396, at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:148) 1690299534396, at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1066) 1690299534396, at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:964) 1690299534396, at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) 1690299534396, at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) 1690299534396, at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) 1690299534396, at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77) 1690299534396, at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67) 1690299534396, at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:126) 1690299534396, at org.springframework.boot.web.servlet.support.ErrorPageFilter.access$000(ErrorPageFilter.java:64) 1690299534396, at org.springframework.boot.web.servlet.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:101) 1690299534396, at org.springframework.boot.web.servlet.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119) 1690299851756,"2023-07-25 15:44:11,756 [80-exec-12] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690301186624,"2023-07-25 16:06:26,624 [080-exec-6] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]" 1690301411707,"2023-07-25 16:10:11,706 [080-exec-8] WARN .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported]"