openlibraryenvironment/gokb

View Title: Delete title

Closed this issue · 5 comments

View Title: Delete title

Added in #250
Endpoint: /titles/<id>/delete
Response: 200

Please use the normal REST Verb delete for this no extra service endpoint.

DELETE /rest/titles/

Fixed in 8.7.0

Deletion of rest/titles/64666 with method DELETE raises a 500:

code: 500
exception: {SQLException: {SQLState: "42601", cause: null, errorCode: 0,…},…}
SQLException: {SQLState: "42601", cause: null, errorCode: 0,…}
cause: {SQLState: "42601", cause: null, errorCode: 0,…}
localizedMessage: "Hibernate operation: could not execute statement; bad SQL grammar [n/a]; nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"↵  Position: 233"
message: "Hibernate operation: could not execute statement; bad SQL grammar [n/a]; nested exception is org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"↵  Position: 233"
mostSpecificCause: {SQLState: "42601", cause: null, errorCode: 0,…}
rootCause: {SQLState: "42601", cause: null, errorCode: 0,…}
sql: "n/a"
stackTrace: [{className: "org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator",…},…]
suppressed: []
message: "Server Error"

It still raises a 500.

DELETE /rest/titles/7711091

{code: 500, message: "Server Error",…}
code: 500
exception: {cause: null, localizedMessage: "Cannot get property 'cause' on null object",…}
cause: null
localizedMessage: "Cannot get property 'cause' on null object"
message: "Cannot get property 'cause' on null object"
stackTrace: [{className: "gokbg3.ErrorController", fileName: "ErrorController.groovy", lineNumber: 19,…},…]
0: {className: "gokbg3.ErrorController", fileName: "ErrorController.groovy", lineNumber: 19,…}
1: {className: "org.grails.core.DefaultGrailsControllerClass$MethodHandleInvoker",…}
2: {className: "org.grails.core.DefaultGrailsControllerClass",…}
3: {className: "org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter",…}
4: {className: "org.s