# Error While posting composition **Category:** [Apps](https://discourse.openehr.org/c/app-dev/8) **Created:** 2021-09-08 08:09 UTC **Views:** 1098 **Replies:** 6 **URL:** https://discourse.openehr.org/t/error-while-posting-composition/1852 --- ## Post #1 by @Yash ![image|514x154](upload://7kZDwoFLqJYMbUUugJDwMdsTGzZ.png) I am receiving this error while posting the composiiton to ehrbase server I have posted the template first , created a blank ehr with ehr ID from OPT and I put the same EHR ID in the params while posting --- ## Post #2 by @Yash 1. error: "org.ehrbase.validation.constraints.wrappers.ValidationException: :-Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006]:Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], ELT02:Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], ELT01:Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], ELT01:Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], value is not within interval, expected:0.0 <= 12312.0 <= 100.0.\n\n" 2. status: "Internal Server Error" Network Error --- ## Post #3 by @ian.mcnicoll Looks like you are sending a pulse oximetry value of 12312.0 when the archetype constrains this to between 0 and 100 --- ## Post #5 by @thomas.beale Errors a bit painful to read, but it does seem like a simple limit violation... [quote="Yash, post:2, topic:1852"] error: ``` org.ehrbase.validation.constraints.wrappers.ValidationException: :- Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006]: Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], ELT02: Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], ELT01: Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], ELT01: Validation error at /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.pulse_oximetry.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0006], value is not within interval, expected:0.0 <= 12312.0 <= 100.0. [/quote] ``` --- ## Post #6 by @ian.mcnicoll @Yash Can you post both the composition instance and the template you are using - ? maybe as a Gist which works pretty well. --- ## Post #7 by @Yash The problem was not with the form or the server but with the script i used to automatiically fill the fields for testing Thank You for your help --- ## Post #8 by @ian.mcnicoll Glad you figured it out!! We've all been there - in my case roughly every 2 weeks :frowning: --- **Canonical:** https://discourse.openehr.org/t/error-while-posting-composition/1852 **Original content:** https://discourse.openehr.org/t/error-while-posting-composition/1852