How to check a job's exit status from a job in a different stage?

I have a multistage build, the second stage performs 2 jobs, and I would like to add a 3 stage that behaves differently depending if the jobs in the previous stage failed or not. If there anyway to get the exit status from jobs on previous stages?

The execution gets to the third stage only if both jobs in the second stage succeeds. If you need more than the binary result, you’ll need to use a more sophisticated mechanism, such as workspaces (for example, a file-based IPC) or an intermediary that stores the results from the second stage and dispenses them to the third stage.