okapi-web

Looks like you are using promises here but instead of chaining them you are nesting their calls which doesn't look like the right way to use them.

I may be wrong here and you may have a reason for the nested calls. If so, please explain it.