Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3686

OData DELETE nonexisting row - wrong response code



      I deployed VDB that can be accessed with OData. When I perform DELETE request to remove row for first time response code is 200 OK (maybe it should be 204) but when I repeat the same DELETE request and tried to delete already deleted entry, response is again 200 OK, but it should be 404 Not Found. Same thing happens even I when tried to delete entry with id that doesn't exist at all.

      Only indication of this problem is in the server log:

      Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      INFO  [org.teiid.ODATA] (http-/ no entity to delete in =  BooksMySQL.BOOKS  with key= ('1')

      I think that response code for deleting row that doesn't exist should be different than 200 OK.
      For example the service at odata.org returns following content with response code 404 Not Found:

      <?xml version="1.0" encoding="utf-8" standalone="yes"?>
      <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
          <message xml:lang="en-US">Resource not found for the segment 'Products'.</message>

        Gliffy Diagrams




              • Assignee:
                rareddy Ramesh Reddy
                msanitra Michal Sanitrak
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: