Mina produkter
Hjälp
Fredrik Klintebäck
CONTRIBUTOR *

Incorrect json when creating an invoice log twice

av Fredrik Klintebäck

I wanted to see what happens if the same invoice log is transferred twice. When I tried this with a voucher log I get a json

 

{

   "success": true

   "errormessage": "En verifikation med samma år, serie och nummer finns redan"

}

 

However, for invoice log I just get a string, not a valid json. See below.

 

It would be much easier to handle errors from the interface if a json was returned also for errors.

 

(151) Data är redan uppdaterad av en annan användare och kan inte sparas!\nTransaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.\nTransaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.\nTransaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.\nTransaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.\nTransaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.

1 SVAR 1

av Fredrik Kurki

Hi Fredrik

It's a bit complicated to give correct error messages in the logs, since they are preliminary. It's when they are transferred the business logic comes in place (to avoid duplicates for instance). Having that said we are looking into improving the error messages in the API for the future. 

Få uppdateringar på det här inlägget i din inkorg

Klicka på de tre prickarna till höger i inlägget/artikeln och välj Prenumerera.

Läs mer om prenumeration här