Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using soft deleteAll endpoint throws exception on unknown id #257

Closed
olliefreeman opened this issue Feb 11, 2022 · 0 comments · Fixed by #335
Closed

Using soft deleteAll endpoint throws exception on unknown id #257

olliefreeman opened this issue Feb 11, 2022 · 0 comments · Fixed by #335
Assignees
Labels
bug Something isn't working
Milestone

Comments

@olliefreeman
Copy link
Contributor

If an unknown id is included in the list of ids to be deleted and permanent is false then an NPE is thrown

{
    "status": 500,
    "reason": "Internal Server Error",
    "errorCode": "UEX--",
    "message": "Cannot invoke method getDirtyPropertyNames() on null object",
    "path": "/api/codeSets",
    "environment": "DEVELOPMENT",
    "version": "5.1.0-SNAPSHOT",
    "exception": {
        "type": "NullPointerException",
        "message": "Cannot invoke method getDirtyPropertyNames() on null object",
        "stacktrace": [
            "uk.ac.ox.softeng.maurodatamapper.core.controller.ModelController.updateResource(ModelController.groovy:765)",
            "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)",
            "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
            "uk.ac.ox.softeng.maurodatamapper.core.controller.ModelController$__tt__deleteAll_closure23.doCall(ModelController.groovy:714)",
            "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)",
            "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
            "uk.ac.ox.softeng.maurodatamapper.core.controller.ModelController.$tt__deleteAll(ModelController.groovy:713)",
            "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)",
            "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
            "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)",
            "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
            "grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)",
            "org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)",
            "grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)",
            "jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)",
            "jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
            "org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker.invoke(DefaultGrailsControllerClass.java:211)",
            "org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)",
            "org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)",
            "org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1067)",
            "org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)",
            "org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)",
            "org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:931)",
            "org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)",
            "org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)",
            "org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)",
            "java.lang.Thread.run(Thread.java:833)"
        ]
    }
}
@olliefreeman olliefreeman added the bug Something isn't working label Feb 11, 2022
@jamesrwelch jamesrwelch moved this to Backlog in MDM State Mar 7, 2022
@olliefreeman olliefreeman moved this from Backlog to Fix for next release in MDM State May 4, 2022
@olliefreeman olliefreeman added this to the 5.2.0 milestone May 4, 2022
@aaronforshaw aaronforshaw self-assigned this Jul 11, 2022
@aaronforshaw aaronforshaw moved this from Fix for next release to In Progress in MDM State Jul 11, 2022
aaronforshaw added a commit that referenced this issue Jul 11, 2022
@aaronforshaw aaronforshaw moved this from In Progress to Open PR in MDM State Jul 13, 2022
joe-crawford added a commit that referenced this issue Jul 19, 2022
Repository owner moved this from Open PR to Merged to Develop / Waiting to release in MDM State Jul 19, 2022
@joe-crawford joe-crawford moved this from Merged to Develop / Waiting to release to Released in MDM State Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

2 participants