# Server error when generating example composition

**URL:** https://discourse.openehr.org/t/server-error-when-generating-example-composition/4534
**Category:** Resources
**Tags:** ehrbase, template
**Created:** [12 October 2023 09:51 UTC](https://discourse.openehr.org/t/server-error-when-generating-example-composition/4534 "2023-10-12T09:51:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Meelzak](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/m/ed8c4c/32.png) [@Meelzak](https://discourse.openehr.org/u/Meelzak)
#### Post date: [12 October 2023 09:51 UTC](https://discourse.openehr.org/t/server-error-when-generating-example-composition/4534/1 "2023-10-12T09:51:09Z")

</div>

Hi,  
I recently implemented an EHRBase instance and I added templates to it.  
I’m using the openEHR Rest API and I was trying to generate example compositions using the following endpoint: **/rest/openehr/v1/definition/template/adl1.4/{template\_id}/example**

The problem that I’m running into is that, some templates work and generate a proper composition but many templates return an **HTTP: 500 internal server error**.

I have no clue why this happens and the templates seem to be succesfully stored, so I don’t see any problem.

Does anyone have experienced a similar issue and could know the cause of it?

---

<div class="post-metadata">

### Author: ![birger.haarbrandt](https://discourse.openehr.org/user_avatar/discourse.openehr.org/birger.haarbrandt/32/24_2.png) [@birger.haarbrandt](https://discourse.openehr.org/u/birger.haarbrandt)
#### Post date: [15 October 2023 15:27 UTC](https://discourse.openehr.org/t/server-error-when-generating-example-composition/4534/2 "2023-10-15T15:27:28Z")

</div>

Hi @Meelzak ,

would you mind creating an issue in the ehrbase Github including said template(s)?

Best,

Birger
