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_INVALIDInvalid VRNThe VAT Registration number is not recognised, this is taken from the

[ System Values | General | Your Company ]. It just means this has not been filled in, or the numeric part of it could not be extracted. Normally this is in the form GB 1111 222 33 and we just grab all the numbers.

403 (Forbidden)CLIENT_OR_AGENT_NOT_AUTHORISEDThe 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.
  1. You still need to submit your last XML return before moving to MTD, please contact HMRC if you encounter this error to check.
  2. There is a problem with your Token, please first contact HMRC and only delete the token and try again if they advise to do so. If you are not sure after having talked to HMRC, please contact our support team.

The token Khaos Control uses can be removed by going into System Data OAuth and removing any entries relating to HMRC.

403 (Forbidden)DUPLICATE_SUBMISSIONUser has already submitted a VAT return for the given periodWe 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_ENDEDReturn submitted too earlyI 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 INVALIDThe 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 fromBased 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 toAs above.
400 (Bad Request)INVALID_DATE_RANGE Invalid date rangeWe 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_INVALIDInvalid period keyKhaos 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 finalAgain, 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_STATUSInvalid status
400 (Bad Request)INVALID_REQUEST Invalid requestThis 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 foundThis 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_VALUEplease provide a numeric field
400 (Bad Request) INVALID_MONETARY_AMOUNTamounts 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_AMOUNTamount 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.

See Also


Did you find this article helpful?