Skip to content
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

search_objects error: User X may not read workspace Y #42

Open
jayrbolton opened this issue Dec 7, 2020 · 0 comments
Open

search_objects error: User X may not read workspace Y #42

jayrbolton opened this issue Dec 7, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jayrbolton
Copy link
Contributor

(Reported by Erik on Jira)

When searching for “coli” in narrative-dev, I’m receiving the error “Searchapi2/legacy search_objects error: User x may not read workspace y”

I’ve replicated with the reduced api call:

{
   "params": [{
   	"match_filter": {
   		"full_text_in_all": "coli",
   		"exclude_subobjects": 1,
   		"source_tags": ["narrative"]
   	},
   	"pagination": {
   		"start": 12,
   		"count": 1
   	},
   	"sorting_rules": [{
   		"is_object_property": 0,
   		"property": "access_group_id",
   		"ascending": 0
   	}]
   }],
   "method": "KBaseSearchEngine.search_objects",
   "version": "1.1",
   "id": "6774851485289732"
}

Which returns:

{
   "jsonrpc": "2.0",
   "id": "6774851485289732",
   "error": {
   	"code": -32001,
   	"message": "Server error",
   	"data": {
   		"method": "KBaseSearchEngine.search_objects",
   		"details": "Object 27 cannot be accessed: User eapearson may not read workspace 65372"
   	}
   }
}

I attempted to disable the workspace and object lookup behavior by setting add_narrative_info and add_access_group_info to 0, but no change in behavior.

In addition to the error itself, it is returned in jsonrpc 2.0 format, so the ui actually reports:

An error was encountered running an rpc method

Because the ui expects a KBase jsonrpc 1.1 error format.

This could have any number of causes, so I won’t even try to guess.

If it is an unavoidable condition, e.g. caused by chasing a reference and hitting a copy of copy bug, it should be handled gracefully by returning the expected results but indicating the error or ignoring it.

@jayrbolton jayrbolton added the bug Something isn't working label Dec 7, 2020
@jayrbolton jayrbolton self-assigned this Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant