Skip to content

Commit

Permalink
output 404 error for unavailable resources
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed May 1, 2022
1 parent e1e7620 commit 0bcbd3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions LitCalNationalAndRegionalData.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ private function retrieveNationalCalendar() {
$responseStr = json_encode( $response );
echo $responseStr;
die();
} else {
header( $_SERVER[ "SERVER_PROTOCOL" ]." 404 Not Found", true, 404 );
echo "{\"message\":\"file $calendarDataFile does not exist\"}";
die();
}
}
}
Expand Down

0 comments on commit 0bcbd3b

Please sign in to comment.