Host responses to infection encompass many processes in addition to activation of the immune system, including metabolic adaptations, stress responses, tissue repair, and other reactions. The response to bacterial infection in Drosophila melanogaster has been classically described in studies that focused on the immune response elicited by a small set of largely avirulent microbes. Thus, we have surprisingly limited knowledge of responses to infection that are outside the canonical immune response, of how the response to pathogenic infection differs from that to avirulent bacteria, or even of how generic the response to various microbes is and what regulates that core response. In this study, we addressed these questions by profiling the D. melanogaster transcriptomic response to 10 bacteria that span the spectrum of virulence. We found that each bacterium triggers a unique transcriptional response, with distinct genes making up to one third of the response elicited by highly virulent bacteria. We also identified a core set of 252 genes that are differentially expressed in response to the majority of bacteria tested. Among these, we determined that the transcription factor CrebA is a novel regulator of infection tolerance. Knock-down of CrebA significantly increased mortality from microbial infection without any concomitant change in bacterial number. Upon infection, CrebA is upregulated by both the Toll and Imd pathways in the fat body, where it is required to induce the expression of secretory pathway genes. Loss of CrebA during infection triggered endoplasmic reticulum (ER) stress and activated the unfolded protein response (UPR), which contributed to infection-induced mortality. Altogether, our study reveals essential features of the response to bacterial infection and elucidates the function of a novel regulator of infection tolerance.