HTTP status code for invalid format

11,745

You can use 422.

The 422 (Unprocessable Entity) status code means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.

You can check this out.

rest API Tutorial - HTTP Status Codes

Share:
11,745

Related videos on Youtube

kenshin9
Author by

kenshin9

Updated on September 14, 2022

Comments

  • kenshin9
    kenshin9 over 1 year

    Our system is accepting a text file upload and is supposed to have a pre-determined line count. If the line count doesn't match up, I want to send a warning of sorts back to the user asking to confirm that they want to upload anyway.

    Is there a particular status code I can use for something like this?