Making Tax Digital - A Guide to Error Messages
The following error messages might occur when you are connecting to HMRC and also when you are submitting a VAT Return.
These are the errors I would expect you might see:
Scenario | HTTP status | Code | Explanation |
---|---|---|---|
400 (Bad Request) | VRN_INVALID | Invalid VRN | The VAT Registration number is not recognised, this is taken from the
|
403 (Forbidden) | CLIENT_OR_AGENT_NOT_AUTHORISED | The client and/or agent is not authorised to request or submit data. | The token we have is for an account Khaos Control is not authorised to communicate with, if this happens, it will be one of two situations.
The token Khaos Control uses can be removed by going into System Data OAuth and removing any entries relating to HMRC. |
403 (Forbidden) | DUPLICATE_SUBMISSION | User has already submitted a VAT return for the given period | We are trying to submit figures for a Tax Period where the obligations have already been met. This happened a lot to us in Testing, but given we only let you select periods which are waiting to be submitted I highly doubt this will happen in Live. |
403 (Forbidden) | TAX_PERIOD_NOT_ENDED | Return submitted too early | I hope this is self-explanatory, it just means the figures for that period are being submitted too early, and we just need to try again later. |
System.Net.WebException: Error when authenticating by code: Error Code: BadRequest, Error content: {"error":"invalid_request","error_description":"code is invalid"} | CODE IS INVALID | The Oauth code provided into the Khaos Control prompt was incorrect. | Please retry the authorisation process again ensuring that your auth code is in the form of a 32 character alphanumeric value |
The following are errors which I doubt you will see as they are either curated by Khaos Control based on the data selected or outside of your control:
Technical errors:
Scenario | HTTP status | Code | Explanation |
---|---|---|---|
400 (Bad Request) | INVALID_DATE_FROM | Invalid date from | Based on the Tax Period opened in Khaos Control, we set this date, so unless you have chosen bad data to start with, I don't think this will be a problem. |
400 (Bad Request) | INVALID_DATE_TO | Invalid date to | As above. |
400 (Bad Request) | INVALID_DATE_RANGE | Invalid date range | We have had a report from Quarterly customers encountering this error. At present Khaos Control requests information for the last year, a revised version of Khaos Control is planned which reduces this request window and eliminate this error. If you encounter this problem please contact our support team. |
400 (Bad Request) | PERIOD_KEY_INVALID | Invalid period key | Khaos Control does not let you select the period key, so this one is out of your hands, we set this based on the Obligation you select as part of the submission process based on information received from HMRC only. |
403 (Forbidden) | NOT_FINALISED | User has not declared VAT return as final | Again, there is a step in the submission process where Khaos Control makes you click a checkbox, and as a result we set this. We don't let you proceed unless you have done this. |
400 (Bad Request) | INVALID_STATUS | Invalid status | |
400 (Bad Request) | INVALID_REQUEST | Invalid request | This should only happen if something has gone wrong within Khaos Control before we reached production and have formulated our submission to HMRC incorrectly, so this is very unlikely. |
404 (Not Found) | NOT_FOUND | The remote endpoint has indicated that no associated data is found | This will only happen if HMRC api is down for some reason. |
The following are all numeric data checks HMRC perform. I don't think we would run into any of these:
Scenario | HTTP status | |
---|---|---|
400 (Bad Request) | VAT_TOTAL_VALUE | totalVatDue should be equal to the sum of vatDueSales and vatDueAcquisitions |
400 (Bad Request) | VAT_NET_VALUE | netVatDue should be the difference between the largest and the smallest values among totalVatDue and vatReclaimedCurrPeriod |
400 (Bad Request) | INVALID_NUMERIC_VALUE | please provide a numeric field |
400 (Bad Request) | INVALID_MONETARY_AMOUNT | amounts should be a non-negative number less than 9999999999999.99 with up to 2 decimal places |
400 (Bad Request) | INVALID_MONETARY_AMOUNT | The value must be between -9999999999999 and 9999999999999 |
400 (Bad Request) | INVALID_MONETARY_AMOUNT | amount should be a monetary value (to 2 decimal places), between 0 and 99999999999.99 |
Error with Tokens
If you change your password or your details, this will invalidate the token held in Khaos Control for your MTD functionality. If you have issues with the token, you will need to remove the token in [ System Data | Others | OAuth Tokens ]
as this would force Khaos Control to re-authenticate on the next attempt.