# URGENT - Merge XFDF API giving \[502\] internal error

**URL:** <https://pdfjs.community/t/urgent-merge-xfdf-api-giving-502-internal-error/1092>\
**Category:** Technical Support\
**Created:** [October 22, 2021, 2:09pm UTC](https://pdfjs.community/t/urgent-merge-xfdf-api-giving-502-internal-error/1092 "2021-10-22T14:09:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![forest](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@forest](https://pdfjs.community/u/forest)\
**Post date:** [October 22, 2021, 2:09pm UTC](https://pdfjs.community/t/urgent-merge-xfdf-api-giving-502-internal-error/1092/1 "2021-10-22T14:09:35Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**

**Detailed description of issue**  
We are getting a [502] internal server error since last night when sending a Merge XFDF REST request.

The link to the pdf file is - [https://parspec-product-url.s3.amazonaws.com/media/submittals/4986/mergedpdfs\_BG9GrZm.pdf](https://parspec-product-url.s3.amazonaws.com/media/submittals/4986/mergedpdfs_BG9GrZm.pdf)

The XFDF to be merged is attached in the txt file.  
[xmlOneFile.zip](https://pdfjs.community/uploads/short-url/wbPb7ugsmfbpYBdDJbh34HuUVsF.zip) (3.5 KB)

I’ve checked the license key and it is fine. This was working fine yesterday evening Indian Time and we haven’t changed anything in the codebase since then. Please help us resolve this ASAP. We’d be grateful as this is essential to our users and they won’t be able to use the product unless this is resolved.

Thanks

**Expected behaviour**  
{Provide a screenshot or description of the expected behaviour}

**Does your issue happen with every document, or just one?**  
Every

**Link to document**  
{Provide a link to the document in question if possible}

**Code snippet**  
{Provide a relevant code snippet}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [October 22, 2021, 2:09pm UTC](https://pdfjs.community/t/urgent-merge-xfdf-api-giving-502-internal-error/1092/3 "2021-10-22T14:09:40Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Merging XFDF using the Express REST API - Body params](https://pdfjs.express/documentation/utils/merge#body-params)
- [Merge & extract annotation in PDF.js Express - Getting started](https://pdfjs.express/documentation/annotation/merge-and-extract#getting-started)
- [Migrating from PDF.js Express to PDFTron - 4. Updating merge and extraction code](https://pdfjs.express/documentation/learn-more/pdfjs-express-to-pdftron.8#4.-updating-merge-and-extraction-code)

APIs:
- [ExpressUtils(optionsopt) - # async merge() → {Promise.}](https://pdfjs.express/api/utils/ExpressUtils.html#merge__anchor)
- [Core.Math.Rect - exportNormalize()](https://pdfjs.express/api/Core.Math.Rect.html#exportNormalize__anchor)
- [Chaining API calls](https://pdfjs.express/api/utils/tutorial-Chaining%20APIs.html#__anchor)

Forums:
- [Merging XFDF using the Express REST API length exceeded error](https://pdfjs.community/t/merging-xfdf-using-the-express-rest-api-length-exceeded-error/185/5)
- [Merge XFDF and file data gets error with large file](https://pdfjs.community/t/merge-xfdf-and-file-data-gets-error-with-large-file/767/3)
- [Merging XFDF using the Express REST API](https://pdfjs.community/t/merging-xfdf-using-the-express-rest-api/105/4)

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [October 22, 2021, 2:15pm UTC](https://pdfjs.community/t/urgent-merge-xfdf-api-giving-502-internal-error/1092/4 "2021-10-22T14:15:03Z")

</div>

Hey there,

Investigating now.

Thanks

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [October 22, 2021, 2:42pm UTC](https://pdfjs.community/t/urgent-merge-xfdf-api-giving-502-internal-error/1092/5 "2021-10-22T14:42:25Z")

</div>

Issue is resolved

Logan
