NextUp error catalog
All errors, regardless of severity, come in the same envelope with HTTP 200:
{ "Result": false, "Error": "Descriptive message" }
The only exception is transport errors (DNS, firewall, timeout) which never get past the proxy and come back as HTTP 502 with a body:
{ "Result": false, "Error": "Proxy error: connect ENETUNREACH 1.2.3.4:8888 - ..." }
Error categories
1. Authentication errors
| Message | Cause | Recommendation |
|---|---|---|
AuthenticationToken lipseste, este invalid sau a expirat. | Token missing / invalid format / expired | Call GetAuthenticationToken again. |
Invalid credentials. | Wrong UserName/Password/Database | Check the combination against the mock's predefined values. |
2. Validation errors
| Message | Cause | Recommendation |
|---|---|---|
Parametrul "X" este obligatoriu. | Field missing from Params | Add the field. The list of required ones is in the API Reference. |
Campul "Method" este obligatoriu. | The envelope has no Method | Check the top level of the JSON. |
Payload-ul nu este JSON valid: ... | Malformed JSON | Validate with a linter. |
Comanda trebuie sa contina cel putin o linie. | Lines: [] | Add at least one line with ArticleCode, Quantity, UnitPrice. |
Factura trebuie sa contina cel putin o linie. | Same | Same |
3. Business errors (NextUp-specific)
These are functional errors of the ERP. The Mock Server reproduces them identically.
| Internal code | Message | Cause | Recommendation |
|---|---|---|---|
duplicate | Partener cu codul "X" exista deja. | Code conflict on AddPartner | Generate a different code or use AddOrUpdatePartner. |
duplicate | Articol cu codul "X" exista deja. | Code conflict on AddArticle | Same. |
not_found | Partenerul cu codul "X" nu a fost gasit. | Lookup on a non-existent code | Check with GetAllPartners. |
not_found | Articol cu codul "X" nu a fost gasit. | Lookup on a non-existent code | Check with GetAllArticles. |
not_found | Cursul valutar pentru simbolul "X" nu este disponibil. | GetExchangeRate with an unknown symbol or a future date | Check the symbol (EUR, USD, ...). |
missing_vat | Cota TVA cu id X nu exista. | Invalid VATRateId on AddArticle | Use one of 1 (19%), 2 (9%), 3 (5%), 4 (0%). |
insufficient_stock | Stoc insuficient pentru articolul "X" in depozitul N. | AddSaleInvoice with quantity > available stock | Check with GetStocksForArticleByCode; do an entry with AddEntryStock first. |
4. Transport errors (proxy)
These appear before reaching NextUp ERP. They come from our proxy, not from the ERP.
| Message | Cause | Recommendation |
|---|---|---|
Proxy error: connect ENETUNREACH ... | The LAN cannot see the ERP | Check the IP in .env, the ping, the firewall. Switch to mock to keep working. |
Proxy error: connect ETIMEDOUT ... | The ERP does not respond | NextUp is probably stopped. Start it via Utilitare → Servicii WEB → Panou de control → Porneste. |
Endpoint-ul "X" nu exista. | Wrong URL in the client (the mock responds this way on 404) | Check the spelling: /NextUpServices/Services/POST/ (with the trailing slash). |
Metoda "X" nu este implementata in mock server. | Wrong method name, or it does not exist in NextUp | Check in the API Reference. |
HTTP status codes (proxy + mock)
| Code | When it appears | Response body |
|---|---|---|
200 | Success AND business errors (NextUp convention) | { Result, Error } |
400 | Malformed headers at the proxy | ad-hoc JSON text |
404 | Wrong URL (at the mock) | { Result:false, Error:... } |
502 | Proxy could not connect to upstream | { Result:false, Error:"Proxy error..." } |
NextUp always returns 200 when the connection succeeded. The only real indicator is Result !== false && Error === null. Build your SDK wrapper with this convention in mind.
Recommended error-handling algorithm
"Strict" mode for integrations
For critical integrations, we recommend applying the following rules before marking a call "OK":
- HTTP status === 200
body.Error === null(or missing from the response)body.Result !== false- For
Add*,body.Resulthas the shape{ Id: number, ... }or is anumber > 0 - For
Update*/Delete*,body.Result === true
Any deviation from these rules should trigger a retry or a high-severity log entry.
Spec version
The error messages reproduced here correspond to NextUp v7.47+. Older versions may use English messages or slightly different formatting. When integrating with old ERPs, do not match on the full string but on a substring (error.includes('insufficient')).