ripple / validator-history-service

Service for ingesting, aggregating, storing, and disbursing XRP Ledger validation related data.
ISC License
14 stars 8 forks source link

Added status error codes to responses #151

Closed sohammk08 closed 10 months ago

sohammk08 commented 10 months ago

High Level Overview of Change

Added status error codes to responses

Context of Change

Addresses #66

Type of Change

Before / After

Changed these two lines so that they provide appropriate status error codes:

233:   if (validator === undefined) {
234:     res.status(404).json({ result: 'error', message: 'Validator not found' })
235:      return
236:    }
275:  } catch {
276:    res.status(500).json({ result: 'error', message: 'Internal server error' })
277:  }