-
Notifications
You must be signed in to change notification settings - Fork 15
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
Error messages instead of HTTP 500 #3
Comments
REST sends all logging information to the console or the kiji-rest/logs/ Can you tell me what you get in the app.log and the requests.log when you On Thu, Jun 6, 2013 at 9:27 AM, andyjagoe [email protected] wrote:
|
Thanks Shashir. app.log looks like what I was looking for. I don't remember seeing this sent to the console. Maybe there is a debug flag I need to set in configuration.yml that is by default disabled for production |
Awesome! So logging is handled by Dropwizard backend. The configuration.yml file By default, the kiji-rest/conf/configuration.yml sends application logs In the Dropwizard section, you will see something like: [...]
Shashir On Thu, Jun 6, 2013 at 2:17 PM, andyjagoe [email protected] wrote:
|
Thanks Shasir! |
Shasir/Amit, I'm re-opening this issue because it's still really tough to work through error conditions with Kiji-REST. I'm trying to do an HTTP DELETE to remove a record, but am unable to do so. I have a record in the database I can retrieve by issuing a GET to the following URL: http://server:8080/v1/instances/default/tables/users/rows?eid=['[email protected]']. However, when I issue a DELETE to the same URL, I receive an HTTP 500 error. The request.log and app.log is below and is not really helpful. I think maybe the larger issue here is the need for documentation somewhere on the REST endpoints themselves. Also, is it really appropriate for a web service to return an HTTP 500 in this situation? I've noticed that all error conditions in Kiji-REST seem to return an HTTP 500--this is not expected behavior and I would only expect an HTTP 500 if Kiji-REST encountered an internal application error due to some unexpected situation (e.g. a bug)... I'd really appreciate any help (and documentation ;-) you have! requests.log (notice one url encoded, one not.... both errors.)
app.log
|
Also tried using the rowkey instead of entity id after finding this blog post (http://www.kiji.org/2013/05/20/revealing-kijirest-resources/), but I still get the same error:
|
@andyjagoe Great question! We really appreciate your feedback! We have a two more KijiREST blog posts in our pipeline so stay tuned for more on that. Simple answerDELETE is (for now) intentionally unimplemented for cells, rows, tables, and instances. However, it's not a good idea to send a "500 Internal server error" code when a "405 Method not allowed" is more appropriate. Why not (yet) implement DELETE?DELETE on cells (perhaps even DELETE-ing all the cells of a row, thus a row) may be considered unnecessary in the HBase+Kiji application world because cells have timestamps. So it may be better from a data conservation perspective to put a cell with a later timestamp to the same column and the older cell persists for analysis at a later time. So DELETE being unimplemented is serving as a heavy-handed access control right now. Since the KijiSchema API's command line tools allow deletes and the API itself provides significantly more sophisticated table interactions, there are arguments from the feature completion perspective to just implement DELETE for cells (and perhaps tables, instances as well?). And your use-case would be very useful in formalizing the semantics of DELETE. Going forwardWe track our issues on http://jira.kiji.org (instead of the more limited Github issue-tracker) so let's move the discussion there. Also, I have created a ticket REST-19 for properly sending DELETE (and perhaps other valid HTTP requests) to a 405 exception for now. Also, we would really like to learn about your use-case and future application bugs you may encounter so please join the user list: [email protected] |
Thanks Shashir. This makes sense, and I agree that it should probably be On Monday, June 10, 2013, Shashir Reddy wrote:
|
Amit...thanks again for the efforts on kiji-rest. I'm liking it...but the lack of debugging information is making it very hard to use. When I'm posting json data to a large table, if anything is wrong the server returns an HTTP 500 with no error message in the console or in the logs. This is extremely painful to uncover things like a number mistakenly showing up as a float instead of a long, etc...
Is there a way you can pass this info on to the console or the logs? Even just a stacktrace would be great. Is this available somewhere else in Kiji perhaps and I'm missing it?
The text was updated successfully, but these errors were encountered: