Abstract-Distributed programs are vulnerable to subtle communication faults (e.g. deadlocks, lost messages). Although the behaviour of individual processes can be relatively straightforward, faults can still be hard to detect because the macroscopic behaviour emerging from interactions can easily become very complex. This paper reports the analysis of gen_server, an Erlang popular library to build client-server applications. Our analysis uses a tool based on choreographic models of communicating finite state machines (CFSMs). We discuss how, once the library has been modelled in terms of CFSMs, an automated analysis can be used to detect potential communication errors. The results of our analysis suggest how to properly use gen_server in order to guarantee the absence of communication errors.