Adds proper error handling instead of panicking

[#82759330]
Begins to add pagination - Next functionality

[#82759330]