> On April 28, 2017, 9:47 a.m., David Radley wrote: > > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java > > Lines 331 (patched) > > <https://reviews.apache.org/r/58833/diff/1/?file=1702343#file1702343line332> > > > > Cna you confirm that there is going to be a reason code returned to the > > user with a message id detailing the actual cause of the error. For example > > that the super type does not exist.
Yes I checked the response in the JSON. Whatever surfaces from downstream is displayed in the response. > On April 28, 2017, 9:47 a.m., David Radley wrote: > > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java > > Lines 894 (patched) > > <https://reviews.apache.org/r/58833/diff/1/?file=1702343#file1702343line896> > > > > I would think there are places that we would want to send a not found . > > for example if we try to update an entry but we cannot find it (i.e. the > > guid or name sent in cannot be found). This logic seems to changing all the > > codes over. > > > > It does not seem right to change the eror code like this - wouldn't it > > be better to set the code correctly when it is originally created - rather > > than fix it up later. As per my experience with REST APIs I never saw a 404 during a PUT call always a 400 because that signals the user/caller that there's something wrong with the request and the error message will provide more context on that. 404 -> 400 is only done for the update calls, GETs/DELETEs will still respond with 404 in such scenario - Apoorv ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58833/#review173308 ----------------------------------------------------------- On April 28, 2017, 5:03 a.m., Apoorv Naik wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58833/ > ----------------------------------------------------------- > > (Updated April 28, 2017, 5:03 a.m.) > > > Review request for atlas, Madhan Neethiraj, Sarath Subramanian, and Suma > Shivaprasad. > > > Repository: atlas > > > Description > ------- > > Following tests > > 1. Creating a type with super type that doesn’t exist > 2. Updating a type with super type that doesn’t exist > 3. Creating a type with attribute of unknown data type > > throw 404 Not Found error. Expected is 400 Bad Request. > > > Diffs > ----- > > > repository/src/main/java/org/apache/atlas/repository/store/graph/AtlasTypeDefGraphStore.java > 82465bfc > > > Diff: https://reviews.apache.org/r/58833/diff/1/ > > > Testing > ------- > > mvn clean package executes successfully > > > Thanks, > > Apoorv Naik > >
