Skip to content

Instantly share code, notes, and snippets.

View pawelgagorowski's full-sized avatar

pawelgagorowski

View GitHub Profile
@pawelgagorowski
pawelgagorowski / index.js
Last active October 9, 2019 06:36
error 401 - no authorization
'use strict';
const AWS = require('aws-sdk');
AWS.config.update({ region: 'us-east-1' })
const { dialogflow, SignIn } = require('actions-on-google');
const app = dialogflow();
const request = require('request-promise')
const rp = require('request-promise');
ssh-keygen -t rsa -b 4096 -C "mail@gmail"
jesli masz więcej kluczy to doadjemy rownież
ssh-add ..ścieżka do klicza jaki chcemy dodać
https://github.com/antonykidis/Setup-ssh-for-github/blob/master/Setup-ssh-on-github.pdf
class CustomError extends Error {
static createCustomErrorResposne(statusCode: number, answer?: string): ErrorResponseType {
return {
statusCode: statusCode,
answer: answer = ''
}
}
static isErrorInstanceOfCustomError(error: any): boolean {
if(error instanceof CustomError) return true
'use strict';
import AWS from "aws-sdk";
import { UserHeaderType } from "../../models/types";
import DynamoDB from "../../classes/dynamoDB";
import logger from "../../config/logger";
const handler = async (event: HeaderRequestInterface<UserHeaderType>) => {
const genaralErrorMessage = "there was an error while checkig business name";