Zoom
4
789
"title": "New movie",
"release": "2024-05-10T00:00:00.000Z",
"description": "Praesent blandit. Nam nulla. Integer pede justo, lacinia eget, tincidunt eget, tempus
vel, pede..
"producer": "665f2cce86531e91c6e33c58",
"director": "665f2fcb6b449f0d1437b6f8",
"genzes": [
"Comedy"."Action"
"stars": [
1.
"665f309c253b0c0839f666f0",
"6651309c253b0c08391666ee"
"_id": "6664a6fff4bf7e4f3328240b",
"createdAt": "2024-06-08T18:46:23.2832",
"updatedAt": "2024-06-08T18:46:23.2832",
"v": 0
10
1.
11
12
13
14
15
16
17
18
19
}
Figure 2 - Receive results response from the API after creating success
When creating a new movie without a title field, the result is shown in Figure 3 (0.25marks).
Body
500 Internal Server Error 46 ms 350 B
Save as example 000
Pretty
Raw Preview Visualize
JSON
1
{
2
"error": {
3
"status": 500,
4
"message": "movie validation failed: title: The movie title is required"
5
}
6
}
+ 100%
Close