How to handle different response statuses of bs-fetch

So I have the following function

    let searchBike = (serialNumber: string) =>
        Fetch.RequestInit.make(~method_=Get, ()),
      ->Js.Promise.then_(Fetch.Response.json, _)
      ->Js.Promise.then_(obj => {
      }, _)

Ho do I act if response is not 200?
Whenever I try to check the code, compiler says that there is no status field in the response.

Ok, I’ve figured out that to get stuff from response I need to call let status = Fetch.Response.status(response)


Can you please explain the functionality of this code?

It makes a request
Decodes the data as json
Decodes the json to bidedata type
And resolves the promise