Beispiel #1
0
    def log_error(self, instance, action='translate', msg=u'', metadata=None):
        metadata = metadata or {}

        j_error(app='translations',
                src=self.name,
                action=action,
                msg=msg,
                instance=instance,
                metadata=metadata)
Beispiel #2
0
def log_error(post_data, errors):
    j_error('heartbeat',
            'HeartbeatV2API',
            'post',
            'packet errors',
            metadata={
                'post_data': post_data,
                'errors': errors
            })
Beispiel #3
0
    def log_error(self, instance, action='translate', msg=u'', metadata=None):
        metadata = metadata or {}

        j_error(
            app='translations',
            src=self.name,
            action=action,
            msg=msg,
            instance=instance,
            metadata=metadata
        )
Beispiel #4
0
 def rest_error(self, post_data, errors):
     statsd.incr('heartbeat.error')
     j_error('heartbeat', 'HeartbeatV2API', 'post', 'packet errors',
             metadata={
                 'post_data': post_data,
                 'errors': errors
             })
     return rest_framework.response.Response(
         status=400,
         data={
             'msg': 'bad request; see errors',
             'errors': errors
         }
     )
Beispiel #5
0
 def rest_error(self, post_data, errors):
     statsd.incr('heartbeat.error')
     j_error('heartbeat',
             'HeartbeatV2API',
             'post',
             'packet errors',
             metadata={
                 'post_data': post_data,
                 'errors': errors
             })
     return rest_framework.response.Response(status=400,
                                             data={
                                                 'msg':
                                                 'bad request; see errors',
                                                 'errors': errors
                                             })
Beispiel #6
0
def log_error(post_data, errors):
    j_error('heartbeat', 'HeartbeatV2API', 'post', 'packet errors',
            metadata={
                'post_data': post_data,
                'errors': errors
            })
Beispiel #7
0
    def log_error(self, instance, action="translate", msg=u"", metadata=None):
        metadata = metadata or {}

        j_error(app="translations", src=self.name, action=action, msg=msg, instance=instance, metadata=metadata)