# Potential bug in data/meta/grpc/handler.go

**URL:** <https://forum.pydio.com/t/potential-bug-in-data-meta-grpc-handler-go/2663>\
**Category:** Pydio Cells\
**Tags:** plugins\
**Created:** [August 4, 2019, 5:55pm UTC](https://forum.pydio.com/t/potential-bug-in-data-meta-grpc-handler-go/2663 "2019-08-04T17:55:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bures](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bures/32/981_2.png) [@bures](https://forum.pydio.com/u/bures)\
**Post date:** [August 4, 2019, 5:55pm UTC](https://forum.pydio.com/t/potential-bug-in-data-meta-grpc-handler-go/2663/1 "2019-08-04T17:55:42Z")

</div>

Hi.

I’m going through Pydio Cells code because I would like to develop an extension to Cells that would bring more metadata types (integrated with advanced search options).

As I was browsing the code, I stumbled on the following, which I suspect is a minor bug

There is no return at

> <https://github.com/pydio/cells/blob/2b3ff319a53a8801e8c6c392f1f4669293c1b49e/data/meta/grpc/handler.go#L248>

This means that the `resp.Success = false` gets overwritten by `resp.Success = true` at [https://github.com/pydio/cells/blob/2b3ff319a53a8801e8c6c392f1f4669293c1b49e/data/meta/grpc/handler.go#L251](https://github.com/pydio/cells/blob/2b3ff319a53a8801e8c6c392f1f4669293c1b49e/data/meta/grpc/handler.go#L251)

In the end, the bug never manifests because the only error that `SetMetadata` generates is `"Unknown statement"`, which can’t happen.

That brings me to another question – why the SetMetadata returns the error `"Unknown statement"` as opposed to panicking? The statement simply has to be there unless there is something wrong with the code.

Sorry digging into something which is only marginally relevant, however, I just wanted to double-check that I understand correctly.

Thanks.  
Tomas

---

<div class="post-metadata">

**Author:** ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)\
**Post date:** [September 10, 2019, 7:45am UTC](https://forum.pydio.com/t/potential-bug-in-data-meta-grpc-handler-go/2663/2 "2019-09-10T07:45:12Z")

</div>

Hello @bures,

Thanks for your contribution, you can look at the rules on github [https://github.com/pydio/cells/blob/master/CONTRIBUTING.md](https://github.com/pydio/cells/blob/master/CONTRIBUTING.md)  
and then proceed to a pull request.
