Skip to content

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

@jayrbolton

Description

@jayrbolton

(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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions