marklogic-community / slush-marklogic-node

Slush generator for a MarkLogic/node project
https://github.com/marklogic-community/slush-marklogic-node/wiki
Other
40 stars 28 forks source link

Add /api/users/admin.json with default to prevent errors in the ErrorLog.txt #377

Closed sashamitrovich closed 7 years ago

sashamitrovich commented 8 years ago

RESTAPI-NODOCUMENT: (err:FOER0000) Resource or document does not exist: category: content message: /api/users/admin.json 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: in /MarkLogic/rest-api/models/document-model-query.xqy, at 469:13, 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: in docmodqry:read-content("/api/users/admin.json") [1.0-ml] 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: $uri = "/api/users/admin.json" 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: $doc = () 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: in /MarkLogic/rest-api/models/document-model-query.xqy, at 424:9, 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: in docmodqry:produce-content("/api/users/admin.json", (), (), ()) [1.0-ml] 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: $uri = "/api/users/admin.json" 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: $start-range = () 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: $end-range = () 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: $content = () 2016-08-16 08:10:20.083 Notice: kpmg-dashboard: in /MarkLogic/rest-api/models/document-model-query.xqy, at 254:13,

patrickmcelwee commented 8 years ago

You can make this go away by adding a profile to for your user (click on 'Account' in the upper right hand corner of the application to go to the profile creation screen).

sashamitrovich commented 8 years ago

I know, but it's an issue for many others who don't know it: when you create a clean slate slush app, you start getting errors in the Error Log immediately. It's bad PR, my first thought before @grtjn explained it was: "oh man, broken already and I haven't done a thing"

grtjn commented 8 years ago

Yeah, it would be nice if the out of the box application would do an attempt to not have that error appear in the logs. I think we could by default add a stub user profile for admin, and app-user, and drop that in data/. A ./ml local deploy content would then prevent the message from appearing in most cases. People will also have an example of how to provide (maybe static) user profiles upfront.

Doing deploy content after clean content would also make sure it won't pop up as easily after a clean content..

In addition, we should also put some notes somewhere. Readme, or wiki, or maybe just a ticket to start with..

grtjn commented 8 years ago

Not really a bug, but marking it as one anyhow to attract more attention..

sashamitrovich commented 8 years ago

Oops, closed by mistake :)

patrickmcelwee commented 8 years ago

Agreed that we should do our best to make this less confusing (and annoying, since I often have to scan past this error to see the error I care about) ... since I'm working on documentation, I'll at least add a note on this, and probably add some default profiles.

grtjn commented 8 years ago

awesome..